feat: 添加菜单拓展字段并优化展示
- 在菜单表单中添加拓展字段(remark)输入框 - 在菜单抽屉组件中自定义渲染拓展字段的展示方式 - 添加对拓展字段用途的说明和提示信息
This commit is contained in:
parent
d01e03fd79
commit
af677cef27
@ -382,4 +382,10 @@ export const drawerSchema: FormSchemaGetter = () => [
|
|||||||
help: '路由的keepAlive属性',
|
help: '路由的keepAlive属性',
|
||||||
label: '是否缓存',
|
label: '是否缓存',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
component: 'Input',
|
||||||
|
fieldName: 'remark',
|
||||||
|
label: '拓展字段',
|
||||||
|
formItemClass: 'items-baseline',
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -10,6 +10,8 @@ import {
|
|||||||
listToTree,
|
listToTree,
|
||||||
} from '@vben/utils';
|
} from '@vben/utils';
|
||||||
|
|
||||||
|
import { Input } from 'ant-design-vue';
|
||||||
|
|
||||||
import { useVbenForm } from '#/adapter/form';
|
import { useVbenForm } from '#/adapter/form';
|
||||||
import { menuAdd, menuInfo, menuList, menuUpdate } from '#/api/system/menu';
|
import { menuAdd, menuInfo, menuList, menuUpdate } from '#/api/system/menu';
|
||||||
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
|
||||||
@ -151,6 +153,16 @@ async function handleClosed() {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<BasicDrawer :title="title" class="w-[600px]">
|
<BasicDrawer :title="title" class="w-[600px]">
|
||||||
<BasicForm />
|
<BasicForm>
|
||||||
|
<template #remark="slotProps">
|
||||||
|
<div class="flex flex-col gap-2">
|
||||||
|
<Input v-bind="slotProps" />
|
||||||
|
<span class="text-[14px] leading-[1.5] text-black/45">
|
||||||
|
在ele作为activePath使用 但是非json格式 v5无法使用
|
||||||
|
建议自行在apps/web-antd/src/router/access.ts更改
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</BasicForm>
|
||||||
</BasicDrawer>
|
</BasicDrawer>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user