feat: 添加菜单拓展字段并优化展示

- 在菜单表单中添加拓展字段(remark)输入框
- 在菜单抽屉组件中自定义渲染拓展字段的展示方式
- 添加对拓展字段用途的说明和提示信息
This commit is contained in:
dap
2025-09-02 19:04:17 +08:00
parent d01e03fd79
commit af677cef27
2 changed files with 19 additions and 1 deletions

View File

@@ -382,4 +382,10 @@ export const drawerSchema: FormSchemaGetter = () => [
help: '路由的keepAlive属性',
label: '是否缓存',
},
{
component: 'Input',
fieldName: 'remark',
label: '拓展字段',
formItemClass: 'items-baseline',
},
];

View File

@@ -10,6 +10,8 @@ import {
listToTree,
} from '@vben/utils';
import { Input } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form';
import { menuAdd, menuInfo, menuList, menuUpdate } from '#/api/system/menu';
import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup';
@@ -151,6 +153,16 @@ async function handleClosed() {
<template>
<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>
</template>