feat: 前端升级至vue3,后端代码结构重构,新增权限管理相关功能

This commit is contained in:
meilin.huang
2021-06-07 17:22:07 +08:00
parent af0d51293e
commit e9b58b4eab
370 changed files with 22339 additions and 18399 deletions

View File

@@ -0,0 +1,29 @@
<template>
<div v-if="getUserAuthBtnList">
<slot />
</div>
</template>
<script lang="ts">
import { computed } from 'vue';
import { useStore } from '/@/store/index.ts';
export default {
name: 'auth',
props: {
value: {
type: String,
default: () => '',
},
},
setup(props) {
const store = useStore();
// 获取 vuex 中的用户权限
const getUserAuthBtnList = computed(() => {
return store.state.userInfos.userInfos.authBtnList.some((v: any) => v === props.value);
});
return {
getUserAuthBtnList,
};
},
};
</script>