优化产品管理表单字段类型定义,将部分字段设为可选

This commit is contained in:
WUSIJIAN
2025-12-09 10:57:13 +08:00
parent 5698d6cbe3
commit 1138655123
2 changed files with 5 additions and 4 deletions

View File

@@ -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, '编辑');

View File

@@ -118,6 +118,7 @@ interface ProductData {
createdAt: string;
updatedAt: string;
rag_doc_id?: string; // 添加缺失的属性
description?: string; // 产品详情
}
/**