From 2e54873dfa5c40c885563468e1ad7eaf79edf467 Mon Sep 17 00:00:00 2001 From: Ximu-Luya <794876939@qq.com> Date: Sun, 17 Mar 2024 01:49:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E5=94=AE=E5=87=BA=E8=A1=A8=E5=8D=95=E7=99=BE?= =?UTF-8?q?=E5=88=86=E6=AF=94=E6=8C=89=E9=92=AE=E6=97=A0=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/SellReportForm.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/SellReportForm.vue b/components/SellReportForm.vue index 9b82218..7e6fffc 100644 --- a/components/SellReportForm.vue +++ b/components/SellReportForm.vue @@ -28,6 +28,15 @@ const { form, onSubmit } = useReportForm({ name: props.product.name, targetCity: props.target.name }); + +const changePricePercent = (type: 'add' | 'reduce') => { + const percent = form.values.percent?.[0] ?? 100; + if (type === 'add') { + form.setFieldValue('percent', [percent + 1]); + } else { + form.setFieldValue('percent', [percent - 1]); + } +}