From e7095865ac4379b14cdc500328241295a8c465f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E4=BC=9F=E6=9D=B0?= <674416404@qq.com> Date: Fri, 4 Aug 2023 17:03:09 +0800 Subject: [PATCH] fix: types error --- src/pages/list/card/components/DialogForm.vue | 28 +++++++++++-------- src/pages/list/card/index.vue | 15 ++-------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/src/pages/list/card/components/DialogForm.vue b/src/pages/list/card/components/DialogForm.vue index 0bf3b82d..f00d0c35 100644 --- a/src/pages/list/card/components/DialogForm.vue +++ b/src/pages/list/card/components/DialogForm.vue @@ -35,10 +35,20 @@ diff --git a/src/pages/list/card/index.vue b/src/pages/list/card/index.vue index c2730099..460446f0 100644 --- a/src/pages/list/card/index.vue +++ b/src/pages/list/card/index.vue @@ -76,23 +76,14 @@ import { getCardList } from '@/api/list'; import type { CardProductType } from '@/components/product-card/index.vue'; import ProductCard from '@/components/product-card/index.vue'; +import type { FormData } from './components/DialogForm.vue'; import DialogForm from './components/DialogForm.vue'; -interface FormData { - name: string; - status: string; - description: string; - type: number; - mark: string; - amount: number; - [key: string]: unknown; -} - const INITIAL_DATA: FormData = { name: '', status: '', description: '', - type: 0, + type: '0', mark: '', amount: 0, }; @@ -158,7 +149,7 @@ const handleManageProduct = (product: CardProductType) => { name: product.name, status: product?.isSetup ? '1' : '0', description: product.description, - type: product.type, + type: product.type.toString(), mark: '', amount: 0, };