'admin-22.06.11:同步master分支v2.1.1版本,具体查看master根目录CHANGELOG.md'

This commit is contained in:
lyt
2022-06-11 22:42:05 +08:00
parent 2a25a1d5c8
commit 5a5f7c324d
79 changed files with 6563 additions and 1803 deletions

View File

@ -1,4 +1,4 @@
import { store } from '/@/store/index';
import { useUserInfo } from '/@/stores/userInfo';
import { judementSameArr } from '/@/utils/arrayOperation';
/**
@ -7,7 +7,8 @@ import { judementSameArr } from '/@/utils/arrayOperation';
* @returns 有权限,返回 `true`,反之则反
*/
export function auth(value) {
return store.state.userInfos.userInfos.authBtnList.some((v) => v === value);
const stores = useUserInfo();
return stores.userInfos.authBtnList.some((v) => v === value);
}
/**
@ -17,7 +18,8 @@ export function auth(value) {
*/
export function auths(value) {
let flag = false;
store.state.userInfos.userInfos.authBtnList.map((val) => {
const stores = useUserInfo();
stores.userInfos.authBtnList.map((val) => {
value.map((v) => {
if (val === v) flag = true;
});
@ -31,5 +33,6 @@ export function auths(value) {
* @returns 有权限,返回 `true`,反之则反
*/
export function authAll(value) {
return judementSameArr(value, store.state.userInfos.userInfos.authBtnList);
const stores = useUserInfo();
return judementSameArr(value, stores.userInfos.authBtnList);
}