util.js
417 Bytes
export const Util = {
isShowBtn: function(value) {
let isShowStatus = false
const menu = JSON.parse(sessionStorage['SCRM_BASE_MENULIST'])
menuLevel(menu)
function menuLevel(item) {
item.forEach(itm => {
if (itm.path == value) {
isShowStatus = true
}
if (itm.children) {
menuLevel(itm.children)
}
})
}
return isShowStatus
}
}