添加指令:v-auth,根据当前角色来选择是否展示页面某些元素

This commit is contained in:
QM303176530
2020-07-26 20:27:39 +08:00
parent 41c4b8f0a5
commit 8dfdb21c36
2 changed files with 45 additions and 3 deletions

View File

@@ -47,6 +47,11 @@ Vue.use(APlayer, {
});
import {auth} from '@/directive/auth'
// 按钮权限指令
auth(Vue)
new Vue({
render: h => h(App),
router,
@@ -56,6 +61,3 @@ new Vue({
//引入echarts
import echarts from 'echarts'
Vue.prototype.$echarts = echarts;