feat: 新增模块首页、国际化适配与菜单重载功能
1. 为菜单数据新增remark字段并设置默认值 2. 全量替换硬编码文本为国际化多语言支持 3. 新增生产配置模块首页组件与路由 4. 新增菜单重载action,支持语言切换后重载菜单 5. 补充简体中文、英文、日文、繁体中文语言包
This commit is contained in:
@@ -89,6 +89,19 @@ export default {
|
||||
|
||||
// 构建菜单树和权限字典
|
||||
menu.install(this, state.sourceData)
|
||||
},
|
||||
async menuReload ({ state, dispatch }) {
|
||||
if (!util.cookies.get('token')) {
|
||||
return
|
||||
}
|
||||
await dispatch('d2admin/db/set', {
|
||||
dbName: 'database',
|
||||
path: '$menu.sourceData',
|
||||
value: [],
|
||||
user: true
|
||||
}, { root: true })
|
||||
state.sourceData = []
|
||||
await dispatch('sourceDataLoad')
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
|
||||
Reference in New Issue
Block a user