refactor: 升级框架
This commit is contained in:
@@ -2,6 +2,8 @@ import type { VbenFormSchema } from '#/adapter/form';
|
||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||
import type { SystemAreaApi } from '#/api/system/area';
|
||||
|
||||
import { z } from '#/adapter/form';
|
||||
|
||||
/** 查询 IP 的表单 */
|
||||
export function useFormSchema(): VbenFormSchema[] {
|
||||
return [
|
||||
@@ -12,7 +14,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
||||
componentProps: {
|
||||
placeholder: '请输入 IP 地址',
|
||||
},
|
||||
rules: 'required',
|
||||
rules: z.string().ip({ message: '请输入正确的 IP 地址' }),
|
||||
},
|
||||
{
|
||||
fieldName: 'result',
|
||||
@@ -32,7 +34,6 @@ export function useGridColumns(): VxeTableGridOptions<SystemAreaApi.Area>['colum
|
||||
{
|
||||
field: 'id',
|
||||
title: '地区编码',
|
||||
minWidth: 120,
|
||||
align: 'left',
|
||||
fixed: 'left',
|
||||
treeNode: true,
|
||||
@@ -40,7 +41,6 @@ export function useGridColumns(): VxeTableGridOptions<SystemAreaApi.Area>['colum
|
||||
{
|
||||
field: 'name',
|
||||
title: '地区名称',
|
||||
minWidth: 200,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user