feat: 支持i18n菜单

This commit is contained in:
dap 2024-10-11 09:29:06 +08:00
parent f707fcb3da
commit 27f62c2bab
3 changed files with 113 additions and 0 deletions

View File

@ -82,5 +82,59 @@
"downloadLoading": "Downloading... Please wait.",
"preview": "Preview"
}
},
"menu": {
"system": {
"root": "System",
"user": "User",
"role": "Role",
"menu": "Menu",
"dept": "Department",
"post": "Post",
"dict": "Dictionary",
"config": "Parameter Settings",
"notice": "Notifications",
"log": {
"root": "Log",
"operation": "Operation Log",
"login": "Login Log"
},
"oss": "File",
"client": "Client"
},
"tenant": {
"root": "Tenant",
"package": "Package"
},
"monitor": {
"root": "System Monitoring",
"online": "Online Users",
"cache": "Cache Monitoring",
"admin": "Admin Monitoring",
"job": "Task Scheduling Center"
},
"tool": {
"root": "System Tools",
"gen": "Code Generation"
},
"workflow": {
"root": "Workflow",
"category": "Process Category",
"model": "Model",
"define": "Process Definition",
"monitor": {
"root": "Process Monitoring",
"instance": "Process Instance",
"todo": "Pending Tasks"
},
"form": "Form"
},
"task": {
"root": "My Tasks",
"apply": "My Initiated Tasks",
"todo": "My Pending Tasks",
"done": "My Completed Tasks",
"cc": "My CC"
}
}
}

View File

@ -82,5 +82,59 @@
"downloadLoading": "下载中, 请稍后...",
"preview": "预览"
}
},
"menu": {
"system": {
"root": "系统管理",
"user": "用户管理",
"role": "角色管理",
"menu": "菜单管理",
"dept": "部门管理",
"post": "岗位管理",
"dict": "字典管理",
"config": "参数设置",
"notice": "通知公告",
"log": {
"root": "日志管理",
"operation": "操作日志",
"login": "登录日志"
},
"oss": "文件管理",
"client": "客户端管理"
},
"tenant": {
"root": "租户管理",
"package": "套餐管理"
},
"monitor": {
"root": "系统监控",
"online": "在线用户",
"cache": "缓存监控",
"admin": "Admin监控",
"job": "任务调度中心"
},
"tool": {
"root": "系统工具",
"gen": "代码生成"
},
"workflow": {
"root": "工作流",
"category": "流程分类",
"model": "模型管理",
"define": "流程定义",
"monitor": {
"root": "流程监控",
"instance": "流程实例",
"todo": "待办任务"
},
"form": "表单管理"
},
"task": {
"root": "我的任务",
"apply": "我发起的",
"todo": "我的待办",
"done": "我的已办",
"cc": "我的抄送"
}
}
}

View File

@ -1,4 +1,5 @@
import { DictEnum } from '@vben/constants';
import { $t } from '@vben/locales';
import { getPopupContainer } from '@vben/utils';
import { type FormSchemaGetter, type VxeGridProps, z } from '#/adapter';
@ -56,6 +57,10 @@ export const columns: VxeGridProps['columns'] = [
field: 'menuName',
treeNode: true,
width: 200,
slots: {
// 需要i18n支持 否则返回原始值
default: ({ row }) => $t(row.menuName),
},
},
{
title: '图标',