优化菜单的按钮权限的判断逻辑

This commit is contained in:
jishenghua
2025-09-18 14:57:38 +08:00
parent 27843d128c
commit d3643c2a99
36 changed files with 38 additions and 7 deletions

View File

@@ -427,15 +427,11 @@ export const JeecgListMixin = {
initActiveBtnStr() {
let btnStrList = Vue.ls.get('winBtnStrList'); //按钮功能列表 JSON字符串
this.btnEnableList = ""; //按钮列表
let pathName = location.pathname
if(pathName.indexOf('/plugins')>-1) {
pathName = '/system' + pathName
}
if (pathName && btnStrList) {
if (this.urlPath && btnStrList) {
for (let i = 0; i < btnStrList.length; i++) {
if (btnStrList[i].url === pathName) {
if (btnStrList[i].url === this.urlPath) {
if (btnStrList[i].btnStr) {
this.btnEnableList = btnStrList[i].btnStr;
this.btnEnableList = btnStrList[i].btnStr
}
}
}