优化产品管理表单字段类型定义,将部分字段设为可选
This commit is contained in:
@@ -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, '编辑');
|
||||
|
||||
@@ -118,6 +118,7 @@ interface ProductData {
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
rag_doc_id?: string; // 添加缺失的属性
|
||||
description?: string; // 产品详情
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user