From 229ce1f60b442a8cc8c459d873ab56362bd3b338 Mon Sep 17 00:00:00 2001 From: aeizzz Date: Wed, 15 Feb 2023 10:12:32 +0800 Subject: [PATCH] =?UTF-8?q?=20:recycle:=20Refactoring=20code.=20=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=8F=9C=E5=8D=95=E7=9A=84i18n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/admin/menu/form.vue | 24 ++++++++++++++++++------ src/views/admin/menu/i18n/en.ts | 18 +++++++++++++++++- src/views/admin/menu/i18n/zh-cn.ts | 12 +++++++++++- 3 files changed, 46 insertions(+), 8 deletions(-) diff --git a/src/views/admin/menu/form.vue b/src/views/admin/menu/form.vue index 086887cc..bf6de8a9 100644 --- a/src/views/admin/menu/form.vue +++ b/src/views/admin/menu/form.vue @@ -17,7 +17,7 @@ + :placeholder="$t('sysmenu.inputParentIdTip')"> @@ -28,12 +28,12 @@ - + - + @@ -43,10 +43,10 @@ - + - + @@ -136,9 +136,21 @@ const getMenuData = () => { menu.children = res.data; state.parentData.push(menu) }) - }; + +const showembedded = ref(false) + + + +watch(() => state.ruleForm.path,(val) => { + if(val.startsWith('http')){ + showembedded.value = true + }else{ + showembedded.value = false + } +}) + const dataRules = reactive({ menType: [{ required: true, message: "姓名不能为空", trigger: "blur" }], parentId: [{ required: true, message: "姓名不能为空", trigger: "blur" }], diff --git a/src/views/admin/menu/i18n/en.ts b/src/views/admin/menu/i18n/en.ts index c1ab003c..344c92fa 100644 --- a/src/views/admin/menu/i18n/en.ts +++ b/src/views/admin/menu/i18n/en.ts @@ -11,6 +11,22 @@ export default { parentId: 'parent menu', embedded: 'embedded', visible: 'visible', - icon: 'icon' + icon: 'icon', + inputMenuIdTip: 'input menuId', + inputPermissionTip: 'input permission', + inputPathTip: 'input path', + inputParentIdTip: 'input parentId', + inputIconTip: 'input icon', + inputVisibleTip: 'input visible', + inputSortOrderTip: 'input sortOrder', + inputKeepAliveTip: 'input keepAlive', + inputMenuTypeTip: 'input menuType', + inputCreateByTip: 'input createBy', + inputCreateTimeTip: 'input createTime', + inputUpdateByTip: 'input updateBy', + inputUpdateTimeTip: 'input updateTime', + inputDelFlagTip: 'input delFlag', + inputTenantIdTip: 'input tenantId', + inputEmbeddedTip: 'input embedded', } } diff --git a/src/views/admin/menu/i18n/zh-cn.ts b/src/views/admin/menu/i18n/zh-cn.ts index 6a2f957c..6e3f4163 100644 --- a/src/views/admin/menu/i18n/zh-cn.ts +++ b/src/views/admin/menu/i18n/zh-cn.ts @@ -11,7 +11,17 @@ export default { parentId: '上级菜单', embedded: '是否内嵌', visible: '是否显示', - icon: '图标' + icon: '图标', + inputMenuIdTip: '', + inputPermissionTip: '请输入权限标识', + inputPathTip: '请输入路由路径', + inputParentIdTip: '请选择上级菜单', + inputIconTip: '请选择图标', + inputVisibleTip: '请选择是否显示', + inputSortOrderTip: '请输入排序', + inputKeepAliveTip: '请选择是否缓冲', + inputMenuTypeTip: '请选择菜单类型', + inputEmbeddedTip: '请选择是否内嵌', }, }