From b23581ba3b0dc0c6925212c99b2cb5691d258ab5 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Fri, 17 Oct 2025 18:17:01 +0800 Subject: [PATCH] fix: warn --- .../src/views/bpm/form/designer/index.vue | 6 ++- .../src/views/bpm/model/form/index.vue | 6 +-- apps/web-antd/src/views/crm/followup/data.ts | 2 +- .../src/views/iot/product/product/data.ts | 37 ++++++++++++------- 4 files changed, 31 insertions(+), 20 deletions(-) diff --git a/apps/web-antd/src/views/bpm/form/designer/index.vue b/apps/web-antd/src/views/bpm/form/designer/index.vue index 473827db7..3b3f1bdc2 100644 --- a/apps/web-antd/src/views/bpm/form/designer/index.vue +++ b/apps/web-antd/src/views/bpm/form/designer/index.vue @@ -8,9 +8,11 @@ import FcDesigner from '@form-create/antd-designer'; import { Button, message } from 'ant-design-vue'; import { getFormDetail } from '#/api/bpm/form'; -import { useFormCreateDesigner } from '#/components/form-create'; +import { + setConfAndFields, + useFormCreateDesigner, +} from '#/components/form-create'; import { router } from '#/router'; -import { setConfAndFields } from '#/utils'; import Form from '#/views/bpm/form/modules/form.vue'; defineOptions({ name: 'BpmFormEditor' }); diff --git a/apps/web-antd/src/views/bpm/model/form/index.vue b/apps/web-antd/src/views/bpm/model/form/index.vue index 7d3c16d9d..786f2bfde 100644 --- a/apps/web-antd/src/views/bpm/model/form/index.vue +++ b/apps/web-antd/src/views/bpm/model/form/index.vue @@ -456,9 +456,9 @@ onBeforeUnmount(() => { > {{ index + 1 }} - {{ - step.title - }} + + {{ step.title }} + diff --git a/apps/web-antd/src/views/crm/followup/data.ts b/apps/web-antd/src/views/crm/followup/data.ts index b64a59ecd..79a341393 100644 --- a/apps/web-antd/src/views/crm/followup/data.ts +++ b/apps/web-antd/src/views/crm/followup/data.ts @@ -188,4 +188,4 @@ export function useFollowUpDetailSchema(): DescriptionItemSchema[] { content: (data) => formatDateTime(data?.updateTime) as string, }, ]; -} \ No newline at end of file +} diff --git a/apps/web-antd/src/views/iot/product/product/data.ts b/apps/web-antd/src/views/iot/product/product/data.ts index 8811e2c64..e1d2d27fd 100644 --- a/apps/web-antd/src/views/iot/product/product/data.ts +++ b/apps/web-antd/src/views/iot/product/product/data.ts @@ -43,12 +43,16 @@ export function useFormSchema(formApi?: any): VbenFormSchema[] { .min(1, 'ProductKey 不能为空') .max(32, 'ProductKey 长度不能超过 32 个字符'), suffix: () => { - return h(Button, { - type: 'default', - onClick: () => { - formApi?.setFieldValue('productKey', generateProductKey()); + return h( + Button, + { + type: 'default', + onClick: () => { + formApi?.setFieldValue('productKey', generateProductKey()); + }, }, - }, { default: () => '重新生成' }); + { default: () => '重新生成' }, + ); }, }, // 编辑时的 ProductKey 字段(禁用,无按钮) @@ -157,7 +161,7 @@ export function useFormSchema(formApi?: any): VbenFormSchema[] { placeholder: '请输入产品描述', rows: 3, }, - } + }, ]; } @@ -192,12 +196,16 @@ export function useBasicFormSchema(formApi?: any): VbenFormSchema[] { .min(1, 'ProductKey 不能为空') .max(32, 'ProductKey 长度不能超过 32 个字符'), suffix: () => { - return h(Button, { - type: 'default', - onClick: () => { - formApi?.setFieldValue('productKey', generateProductKey()); + return h( + Button, + { + type: 'default', + onClick: () => { + formApi?.setFieldValue('productKey', generateProductKey()); + }, }, - }, { default: () => '重新生成' }); + { default: () => '重新生成' }, + ); }, }, // 编辑时的 ProductKey 字段(禁用,无按钮) @@ -297,7 +305,7 @@ export function useBasicFormSchema(formApi?: any): VbenFormSchema[] { placeholder: '请选择定位类型', }, rules: 'required', - } + }, ]; } @@ -307,7 +315,7 @@ export function useAdvancedFormSchema(): VbenFormSchema[] { { fieldName: 'icon', label: '产品图标', - component: 'IconPicker',//用这个组件 产品卡片列表 可以根据这个显示 否则就显示默认的 + component: 'IconPicker', // 用这个组件 产品卡片列表 可以根据这个显示 否则就显示默认的 componentProps: { placeholder: '请选择产品图标', prefix: 'carbon', @@ -440,7 +448,8 @@ export function useImagePreview() { /** 生成 ProductKey(包含大小写字母和数字) */ export function generateProductKey(): string { - const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + const chars = + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let result = ''; for (let i = 0; i < 16; i++) { result += chars.charAt(Math.floor(Math.random() * chars.length));