diff --git a/src/views/system/menuManagement/options.ts b/src/views/system/menuManagement/options.ts new file mode 100644 index 0000000..0263e9a --- /dev/null +++ b/src/views/system/menuManagement/options.ts @@ -0,0 +1,47 @@ +import { Tools, List, HomeFilled, UserFilled, Platform, BellFilled, GoodsFilled, WarningFilled } from '@element-plus/icons-vue' + +// 定义图标映射表配置 +export const menuiconMap: Record = { + Tools, + List, + HomeFilled, + UserFilled, + Platform, + BellFilled, + GoodsFilled, + WarningFilled +} + +// 定义选择图标选项列表配置 +export const MenuiconOptions = [ + { label: "无图标", value: "无图标" }, + { label: "Tools(工具)", value: "Tools", icon: Tools }, + { label: "List(列表)", value: "List", icon: List }, + { label: "HomeFilled(首页)", value: "HomeFilled", icon: HomeFilled }, + { label: "UserFilled(用户)", value: "UserFilled", icon: UserFilled }, + { label: "Platform(平台)", value: "Platform", icon: Platform }, + { label: "BellFilled(铃铛)", value: "BellFilled", icon: BellFilled }, + { label: "GoodsFilled(商品)", value: "GoodsFilled", icon: GoodsFilled }, + { label: "WarningFilled(警告)", value: "WarningFilled", icon: WarningFilled }, +] + +//定义table配置 +export const MenuTableColumns = [ + { prop: 'name', label: '菜单名称', align: 'center' as const, width: '120px' }, + { prop: 'path', label: '路由路径', align: 'center' as const, width: '120px' }, + { label: '图标', slotName: 'icon', align: 'center' as const }, + { label: '类型', slotName: 'type', align: 'center' as const }, + { label: '状态', slotName: 'status', align: 'center' as const }, + { label: '操作', slotName: 'action', align: 'center' as const } +] + +//定义menuForm配置 +export const MenuFormItemOptions = [ + { prop: 'name', label: '菜单名称', type: 'input' as const,placeholder: '请输入菜单名称' }, + { prop: 'parentName', label: '父级菜单', type: 'select' as const, placeholder: '请选择父级菜单' }, + { prop: 'path', label: '路由路径', type: 'input' as const, placeholder: '请输入路由路径' }, + { prop: 'api', label: '后端路由', type: 'input' as const, placeholder: '请输入后端路由' }, + { prop: 'icon', label: '图标名称', type: 'select' as const, placeholder: '请选择图标名称' }, + { prop: 'sort', label: '排序', type: 'number' as const, placeholder: '请输入排序' }, + { prop: 'type', label: '菜单类型', type: 'radio' as const, placeholder: '请选择菜单类型' } +]