数据结构优化
This commit is contained in:
@@ -17,16 +17,17 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 描述字段 -->
|
||||
<!-- Slug 字段 -->
|
||||
<div class="form-group">
|
||||
<label for="description" class="form-label">描述</label>
|
||||
<textarea
|
||||
id="description"
|
||||
v-model="tagForm.description"
|
||||
<label for="slug" class="form-label">别名 (Slug)</label>
|
||||
<input
|
||||
type="text"
|
||||
id="slug"
|
||||
v-model="tagForm.slug"
|
||||
class="form-input"
|
||||
placeholder="请输入标签描述"
|
||||
rows="3"
|
||||
></textarea>
|
||||
placeholder="请输入标签别名(用于URL,如:vue-3)"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 表单按钮 -->
|
||||
@@ -59,7 +60,7 @@ const isEdit = computed(() => !!route.params.id)
|
||||
// 标签表单数据
|
||||
const tagForm = ref({
|
||||
name: '',
|
||||
description: ''
|
||||
slug: ''
|
||||
})
|
||||
|
||||
// 获取标签详情
|
||||
@@ -71,7 +72,7 @@ const fetchTagDetail = async () => {
|
||||
const tag = await adminGetTag(tagId)
|
||||
tagForm.value = {
|
||||
name: tag.name,
|
||||
description: tag.description
|
||||
slug: tag.slug
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('Failed to fetch tag detail:', error)
|
||||
|
||||
Reference in New Issue
Block a user