diff --git a/apps/web-antd/src/views/system/area/data.ts b/apps/web-antd/src/views/system/area/data.ts index e4316f70e..07af5d098 100644 --- a/apps/web-antd/src/views/system/area/data.ts +++ b/apps/web-antd/src/views/system/area/data.ts @@ -1,10 +1,7 @@ import type { VxeTableGridOptions } from '@vben/plugins/vxe-table'; -import type { VbenFormSchema } from '#/adapter/form'; -import type { OnActionClickFn } from '#/adapter/vxe-table'; -import type { SystemAreaApi } from '#/api/system/area'; -import { z } from '#/adapter/form'; -import { useAccess } from '@vben/access'; +import type { VbenFormSchema } from '#/adapter/form'; +import type { SystemAreaApi } from '#/api/system/area'; /** 查询 IP 的表单 */ export function useFormSchema(): VbenFormSchema[] { @@ -25,7 +22,7 @@ export function useFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '展示查询 IP 结果', readonly: true, - } + }, }, ]; } diff --git a/apps/web-antd/src/views/system/area/index.vue b/apps/web-antd/src/views/system/area/index.vue index 88d71d216..e97f2f94d 100644 --- a/apps/web-antd/src/views/system/area/index.vue +++ b/apps/web-antd/src/views/system/area/index.vue @@ -2,15 +2,16 @@ import type { VxeTableGridOptions } from '#/adapter/vxe-table'; import { Page, useVbenModal } from '@vben/common-ui'; -import { Button } from 'ant-design-vue'; import { Search } from '@vben/icons'; -import Form from './modules/form.vue'; -import { DocAlert } from '#/components/doc-alert'; + +import { Button } from 'ant-design-vue'; import { useVbenVxeGrid } from '#/adapter/vxe-table'; import { getAreaTree } from '#/api/system/area'; +import { DocAlert } from '#/components/doc-alert'; import { useGridColumns } from './data'; +import Form from './modules/form.vue'; const [FormModal, formModalApi] = useVbenModal({ connectedComponent: Form, diff --git a/apps/web-antd/src/views/system/area/modules/form.vue b/apps/web-antd/src/views/system/area/modules/form.vue index adce24200..a11e9b5fe 100644 --- a/apps/web-antd/src/views/system/area/modules/form.vue +++ b/apps/web-antd/src/views/system/area/modules/form.vue @@ -1,16 +1,15 @@ diff --git a/apps/web-antd/src/views/system/dept/data.ts b/apps/web-antd/src/views/system/dept/data.ts index 2fd458407..1f3c3d691 100644 --- a/apps/web-antd/src/views/system/dept/data.ts +++ b/apps/web-antd/src/views/system/dept/data.ts @@ -1,15 +1,17 @@ import type { VxeTableGridOptions } from '@vben/plugins/vxe-table'; + import type { VbenFormSchema } from '#/adapter/form'; import type { OnActionClickFn } from '#/adapter/vxe-table'; import type { SystemDeptApi } from '#/api/system/dept'; +import { useAccess } from '@vben/access'; + import { z } from '#/adapter/form'; import { getDeptList } from '#/api/system/dept'; import { getSimpleUserList } from '#/api/system/user'; -import { DICT_TYPE, getDictOptions } from '#/utils/dict'; import { CommonStatusEnum } from '#/utils/constants'; +import { DICT_TYPE, getDictOptions } from '#/utils/dict'; import { handleTree } from '#/utils/tree'; -import { useAccess } from '@vben/access'; const { hasAccessByCodes } = useAccess(); @@ -93,7 +95,7 @@ export function useFormSchema(): VbenFormSchema[] { rules: z .string() // TODO @芋艿:未来怎么拓展一个手机的 - .regex(/^1[3|4|5|6|7|8|9][0-9]\d{8}$/, '请输入正确的手机号码') + .regex(/^1[3-9|]\d{9}$/, '请输入正确的手机号码') .optional(), }, { @@ -103,10 +105,7 @@ export function useFormSchema(): VbenFormSchema[] { componentProps: { placeholder: '请输入邮箱', }, - rules: z - .string() - .email('请输入正确的邮箱地址') - .optional(), + rules: z.string().email('请输入正确的邮箱地址').optional(), }, { fieldName: 'status', @@ -141,7 +140,9 @@ export function useGridColumns( title: '负责人', minWidth: 150, formatter: (row) => { - return userList.find((user) => user.id === row.cellValue)?.nickname || '-'; + return ( + userList.find((user) => user.id === row.cellValue)?.nickname || '-' + ); }, }, { diff --git a/apps/web-antd/src/views/system/dept/index.vue b/apps/web-antd/src/views/system/dept/index.vue index ba5d22eda..b790d2dec 100644 --- a/apps/web-antd/src/views/system/dept/index.vue +++ b/apps/web-antd/src/views/system/dept/index.vue @@ -1,18 +1,23 @@ diff --git a/apps/web-antd/src/views/system/dict/modules/data-form.vue b/apps/web-antd/src/views/system/dict/modules/data-form.vue index b740e473c..c3a69ed6f 100644 --- a/apps/web-antd/src/views/system/dict/modules/data-form.vue +++ b/apps/web-antd/src/views/system/dict/modules/data-form.vue @@ -1,12 +1,18 @@