diff --git a/src/pages/product/edit-modal.vue b/src/pages/product/edit-modal.vue index 8a034a0..2544f5e 100644 --- a/src/pages/product/edit-modal.vue +++ b/src/pages/product/edit-modal.vue @@ -18,6 +18,9 @@ const { loading, runAsync, error } = useRequest(saveProduct, { }) function handleSave() { + currentData.created_at = undefined; + currentData.updated_at = undefined; + currentData.status = undefined; runAsync(currentData).then(() => { editData.value = undefined; emit('saved') @@ -33,32 +36,6 @@ function handleFinishError(errorInfo: any) { function onValuesChange() { error.value = undefined } -/* -[ - { id: 1, name: "能量密度", alias: "power" }, - { id: 2, name: "蛋白Pro", alias: "protein" }, - { id: 3, name: "Glu", alias: "glu" }, - { id: 4, name: "Fat", alias: "fat" }, - { id: 5, name: "纤维素", alias: "cellulose" }, - { id: 6, name: "Na", alias: "na" }, - { id: 7, name: "K", alias: "k" }, - { id: 8, name: "Ca", alias: "ca" }, - { id: 9, name: "P", alias: "p" }, - { id: 10, name: "Mg", alias: "mg" }, -]; -*/ -// const DataFields = [ -// { label: '能量密度', name: 'power',message:'请输入能量密度数据' }, -// { label: '蛋白Pro', name: 'protein',message:'请输入蛋白Pro数据' }, -// { label: 'Glu', name: 'glu',message:'请输入Glu数据' }, -// { label: 'Fat', name: 'fat',message:'请输入Fat数据' }, -// { label: '纤维素', name: 'cellulose',message:'请输入纤维素数据' }, -// { label: 'Na', name: 'na',message:'请输入Na数据' }, -// { label: 'K', name: 'k',message:'请输入K数据' }, -// { label: 'Ca', name: 'ca',message:'请输入Ca数据' }, -// { label: 'P', name: 'p',message:'请输入P数据' }, -// { label: 'Mg', name: 'mg',message:'请输入Mg数据' }, -// ]