From b376ab792a331b6504171bb4c0845a8c5fc8a46c Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 25 Nov 2024 22:35:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue | 7 +++---- ruoyi-ui/src/plugins/cache.js | 2 ++ ruoyi-ui/src/utils/validate.js | 6 +++--- ruoyi-ui/src/views/system/config/index.vue | 2 +- ruoyi-ui/src/views/system/role/index.vue | 4 ++-- ruoyi-ui/src/views/system/user/index.vue | 6 +++--- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue index ca3ae183..3a81d29a 100644 --- a/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue +++ b/ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue @@ -62,11 +62,10 @@ export default { const showingChildren = children.filter(item => { if (item.hidden) { return false - } else { - // Temp set(will be used if only has one showing child) - this.onlyOneChild = item - return true } + // Temp set(will be used if only has one showing child) + this.onlyOneChild = item + return true }) // When there is only one child router, the child router is displayed by default diff --git a/ruoyi-ui/src/plugins/cache.js b/ruoyi-ui/src/plugins/cache.js index 6f71b8e5..e912c9a2 100644 --- a/ruoyi-ui/src/plugins/cache.js +++ b/ruoyi-ui/src/plugins/cache.js @@ -26,6 +26,7 @@ const sessionCache = { if (value != null) { return JSON.parse(value) } + return null }, remove (key) { sessionStorage.removeItem(key); @@ -59,6 +60,7 @@ const localCache = { if (value != null) { return JSON.parse(value) } + return null }, remove (key) { localStorage.removeItem(key); diff --git a/ruoyi-ui/src/utils/validate.js b/ruoyi-ui/src/utils/validate.js index bf3e272e..287d5184 100644 --- a/ruoyi-ui/src/utils/validate.js +++ b/ruoyi-ui/src/utils/validate.js @@ -1,5 +1,5 @@ /** - * жvalueַǷΪ + * 判断value字符串是否为空 * @param {string} value * @returns {Boolean} */ @@ -11,7 +11,7 @@ export function isEmpty(value) { } /** - * жurlǷhttphttps + * 判断url是否是http或https * @param {string} url * @returns {Boolean} */ @@ -20,7 +20,7 @@ export function isHttp(url) { } /** - * жpathǷΪ + * 判断path是否为外链 * @param {string} path * @returns {Boolean} */ diff --git a/ruoyi-ui/src/views/system/config/index.vue b/ruoyi-ui/src/views/system/config/index.vue index 3ab81fc2..6bde2ee0 100644 --- a/ruoyi-ui/src/views/system/config/index.vue +++ b/ruoyi-ui/src/views/system/config/index.vue @@ -157,7 +157,7 @@ - + diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index cc9e5410..db861e5f 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -522,8 +522,8 @@ export default { }) }); }); - this.title = "修改角色"; }); + this.title = "修改角色"; }, /** 选择角色权限范围触发 */ dataScopeSelectChange(value) { @@ -543,8 +543,8 @@ export default { this.$refs.dept.setCheckedKeys(res.checkedKeys); }); }); - this.title = "分配数据权限"; }); + this.title = "分配数据权限"; }, /** 分配用户操作 */ handleAuthUser: function(row) { diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue index 2de21e1d..6a0ffcf3 100644 --- a/ruoyi-ui/src/views/system/user/index.vue +++ b/ruoyi-ui/src/views/system/user/index.vue @@ -1,7 +1,7 @@