v3.9.0【优化】typescript版本;【优化】App端消息;【优化】弹出层z-index;

This commit is contained in:
zhuoda
2024-11-04 20:15:49 +08:00
parent 17a3e1fd86
commit 69fa9088f5
1376 changed files with 10373 additions and 9712 deletions

View File

@@ -0,0 +1,29 @@
/*
* 权限
*
* @Author: 1024创新实验室-主任:卓大
* @Date: 2022-09-06 20:00:40
* @Wechat: zhuda1024
* @Email: lab1024@163.com
* @Copyright 1024创新实验室 https://1024lab.net Since 2012
*/
import { useUserStore } from '/@/store/modules/system/user';
import _ from 'lodash';
export function privilegeDirective(el, binding) {
// 超级管理员
if (useUserStore().administratorFlag) {
return true;
}
// 获取功能点权限
let userPointsList = useUserStore().getPointList;
if (!userPointsList) {
return false;
}
// 如果有权限,删除节点
if (!_.some(userPointsList, ['webPerms', binding.value])) {
el.parentNode.removeChild(el);
}
return true;
}