review:【antd】【iot】设备分类、分组的 review

This commit is contained in:
YunaiV
2025-11-02 08:47:58 +08:00
parent 00e587593d
commit aee9e4ad1f
6 changed files with 6 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ import { getDictOptions } from '@vben/hooks';
import { z } from '#/adapter/form';
import { getRangePickerDefaultProps } from '#/utils';
/** 新增/修改设备分组的表单 */
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
return [
{

View File

@@ -42,6 +42,7 @@ const [Form, formApi] = useVbenForm({
showDefaultActions: false,
});
// TODO @haohao参考别的 form1文件的命名可以简化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;
}

View File

@@ -7,7 +7,7 @@ import { getDictOptions } from '@vben/hooks';
import { z } from '#/adapter/form';
import { getRangePickerDefaultProps } from '#/utils';
/** 新增/修改产品分类的表单 */
/** 新增/修改的表单 */
export function useFormSchema(): VbenFormSchema[] {
return [
{

View File

@@ -105,8 +105,6 @@ const [Grid, gridApi] = useVbenVxeGrid({
]"
/>
</template>
<!-- 操作列 -->
<template #actions="{ row }">
<TableAction
:actions="[

View File

@@ -38,6 +38,7 @@ const [Form, formApi] = useVbenForm({
showDefaultActions: false,
});
// TODO @haohao参考别的 form1文件的命名可以简化2代码可以在简化下
const [Modal, modalApi] = useVbenModal({
async onConfirm() {
const { valid } = await formApi.validate();

View File

@@ -19,6 +19,7 @@ import {
import { getProductPage } from '#/api/iot/product/product';
// TODO @haohao命名不太对可以简化下
defineOptions({ name: 'ProductCardView' });
const props = defineProps<Props>();