From aee9e4ad1f73f276edfaa605412195c42d2ee1e5 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 2 Nov 2025 08:47:58 +0800 Subject: [PATCH] =?UTF-8?q?review=EF=BC=9A=E3=80=90antd=E3=80=91=E3=80=90i?= =?UTF-8?q?ot=E3=80=91=E8=AE=BE=E5=A4=87=E5=88=86=E7=B1=BB=E3=80=81?= =?UTF-8?q?=E5=88=86=E7=BB=84=E7=9A=84=20review?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/views/iot/device/group/data.ts | 2 +- .../src/views/iot/device/group/modules/device-group-form.vue | 3 ++- apps/web-antd/src/views/iot/product/category/data.ts | 2 +- apps/web-antd/src/views/iot/product/category/index.vue | 2 -- .../views/iot/product/category/modules/ProductCategoryForm.vue | 1 + .../src/views/iot/product/product/modules/ProductCardView.vue | 1 + 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/web-antd/src/views/iot/device/group/data.ts b/apps/web-antd/src/views/iot/device/group/data.ts index 01b4cc3f9..ca6a10a88 100644 --- a/apps/web-antd/src/views/iot/device/group/data.ts +++ b/apps/web-antd/src/views/iot/device/group/data.ts @@ -7,7 +7,7 @@ import { getDictOptions } from '@vben/hooks'; import { z } from '#/adapter/form'; import { getRangePickerDefaultProps } from '#/utils'; -/** 新增/修改设备分组的表单 */ +/** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { return [ { diff --git a/apps/web-antd/src/views/iot/device/group/modules/device-group-form.vue b/apps/web-antd/src/views/iot/device/group/modules/device-group-form.vue index 28168c0b4..26dfe29d0 100644 --- a/apps/web-antd/src/views/iot/device/group/modules/device-group-form.vue +++ b/apps/web-antd/src/views/iot/device/group/modules/device-group-form.vue @@ -42,6 +42,7 @@ const [Form, formApi] = useVbenForm({ showDefaultActions: false, }); +// TODO @haohao:参考别的 form;1)文件的命名可以简化;2)代码可以在简化下; const [Modal, modalApi] = useVbenModal({ async onConfirm() { const { valid } = await formApi.validate(); @@ -71,7 +72,7 @@ const [Modal, modalApi] = useVbenModal({ async onOpenChange(isOpen: boolean) { if (!isOpen) { formData.value = undefined; - formApi.resetForm(); + await formApi.resetForm(); return; } diff --git a/apps/web-antd/src/views/iot/product/category/data.ts b/apps/web-antd/src/views/iot/product/category/data.ts index 4857bc7d2..da109b8bc 100644 --- a/apps/web-antd/src/views/iot/product/category/data.ts +++ b/apps/web-antd/src/views/iot/product/category/data.ts @@ -7,7 +7,7 @@ import { getDictOptions } from '@vben/hooks'; import { z } from '#/adapter/form'; import { getRangePickerDefaultProps } from '#/utils'; -/** 新增/修改产品分类的表单 */ +/** 新增/修改的表单 */ export function useFormSchema(): VbenFormSchema[] { return [ { diff --git a/apps/web-antd/src/views/iot/product/category/index.vue b/apps/web-antd/src/views/iot/product/category/index.vue index 476c5991e..3ccc4e830 100644 --- a/apps/web-antd/src/views/iot/product/category/index.vue +++ b/apps/web-antd/src/views/iot/product/category/index.vue @@ -105,8 +105,6 @@ const [Grid, gridApi] = useVbenVxeGrid({ ]" /> - -