优化页面按钮显示的逻辑

This commit is contained in:
季圣华
2022-01-09 20:25:24 +08:00
parent ae77bf873a
commit b7ef95ab0c
3 changed files with 3 additions and 11 deletions

View File

@@ -351,12 +351,11 @@ export const JeecgListMixin = {
},
/* 按钮权限 */
initActiveBtnStr() {
let funId = Vue.ls.get('funId'); //功能id
let btnStrList = Vue.ls.get('winBtnStrList'); //按钮功能列表 JSON字符串
this.btnEnableList = ""; //按钮列表
if (funId && btnStrList) {
if (location.pathname && btnStrList) {
for (let i = 0; i < btnStrList.length; i++) {
if (btnStrList[i].funId == funId) {
if (btnStrList[i].url === location.pathname) {
if (btnStrList[i].btnStr) {
this.btnEnableList = btnStrList[i].btnStr;
}