diff --git a/src/views/customerService/product/component/editRole.vue b/src/views/customerService/product/component/editRole.vue index 5eb2c96..06c913e 100644 --- a/src/views/customerService/product/component/editRole.vue +++ b/src/views/customerService/product/component/editRole.vue @@ -44,9 +44,9 @@ import Editor from '/@/components/editor/index.vue'; interface ProductFormData { id: number; // 产品ID name: string; // 产品名称 - description: string; // 产品详情(富文本内容) - creator: ''; - modifier: ''; + description?: string; // 产品详情(富文本内容) + creator?: string; + modifier?: string; } /** @@ -126,7 +126,7 @@ const openDialog = async (row?: ProductFormData) => { const handleEditMode = async (row: ProductFormData) => { try { state.formData.id = row.id; - state.formData.description = row.description; + state.formData.description = row.description ?? ''; state.formData.name = row.name; console.log(row, '编辑'); diff --git a/src/views/customerService/product/index.vue b/src/views/customerService/product/index.vue index 5aea33e..8c82eeb 100644 --- a/src/views/customerService/product/index.vue +++ b/src/views/customerService/product/index.vue @@ -118,6 +118,7 @@ interface ProductData { createdAt: string; updatedAt: string; rag_doc_id?: string; // 添加缺失的属性 + description?: string; // 产品详情 } /**