chore: 默认值
This commit is contained in:
@@ -117,13 +117,18 @@ export const drawerSchema: FormSchemaGetter = () => [
|
||||
rules: z
|
||||
.string()
|
||||
.regex(/^1[3,4578]\d{9}$/, { message: '请输入正确的手机号' })
|
||||
.optional(),
|
||||
.optional()
|
||||
.or(z.literal('')),
|
||||
},
|
||||
{
|
||||
component: 'Input',
|
||||
fieldName: 'email',
|
||||
label: '邮箱',
|
||||
rules: z.string().email({ message: '请输入正确的邮箱' }).optional(),
|
||||
rules: z
|
||||
.string()
|
||||
.email({ message: '请输入正确的邮箱' })
|
||||
.optional()
|
||||
.or(z.literal('')),
|
||||
},
|
||||
{
|
||||
component: 'RadioGroup',
|
||||
|
@@ -31,7 +31,7 @@ const gridOptions: VxeGridProps = {
|
||||
},
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async (_, formValues) => {
|
||||
query: async (_, formValues = {}) => {
|
||||
const resp = await deptList({
|
||||
...formValues,
|
||||
});
|
||||
@@ -117,31 +117,29 @@ function collapseAll() {
|
||||
</Space>
|
||||
</template>
|
||||
<template #action="{ row }">
|
||||
<Space>
|
||||
<a-button
|
||||
size="small"
|
||||
type="link"
|
||||
v-access:code="['system:dept:edit']"
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
{{ $t('pages.common.edit') }}
|
||||
</a-button>
|
||||
<Popconfirm
|
||||
placement="left"
|
||||
title="确认删除?"
|
||||
@confirm="handleDelete(row)"
|
||||
>
|
||||
<a-button
|
||||
danger
|
||||
size="small"
|
||||
type="link"
|
||||
v-access:code="['system:dept:edit']"
|
||||
@click="handleEdit(row)"
|
||||
v-access:code="['system:dept:remove']"
|
||||
@click.stop=""
|
||||
>
|
||||
{{ $t('pages.common.edit') }}
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
<Popconfirm
|
||||
placement="left"
|
||||
title="确认删除?"
|
||||
@confirm="handleDelete(row)"
|
||||
>
|
||||
<a-button
|
||||
danger
|
||||
size="small"
|
||||
type="link"
|
||||
v-access:code="['system:dept:remove']"
|
||||
@click.stop=""
|
||||
>
|
||||
{{ $t('pages.common.delete') }}
|
||||
</a-button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
</Popconfirm>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<DeptDrawer @reload="tableApi.query()" />
|
||||
|
Reference in New Issue
Block a user