File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 11// 权限按钮展示指令
22import { store } from '@/store/index'
3- const userInfo = store . getters [ 'user/userInfo' ]
43export const auth = ( Vue ) => {
54 Vue . directive ( 'auth' , {
65 // 当被绑定的元素插入到 DOM 中时……
76 bind : function ( el , binding ) {
7+ const userInfo = store . getters [ 'user/userInfo' ]
88 let type = ""
99 switch ( Object . prototype . toString . call ( binding . value ) ) {
1010 case "[object Array]" :
@@ -27,7 +27,6 @@ export const auth = (Vue) => {
2727 return
2828 }
2929 const waitUse = binding . value . toString ( ) . split ( "," )
30-
3130 let flag = waitUse . some ( item => item == userInfo . authorityId )
3231 if ( binding . modifiers . not ) {
3332 flag = ! flag
Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ import {
5252 Steps ,
5353 Upload ,
5454 Progress ,
55- MessageBox
55+ MessageBox ,
56+ Image
5657} from 'element-ui' ;
5758
5859Vue . use ( Button ) ;
@@ -103,6 +104,7 @@ Vue.use(Upload);
103104Vue . use ( Progress ) ;
104105Vue . use ( Scrollbar ) ;
105106Vue . use ( Loading . directive ) ;
107+ Vue . use ( Image )
106108
107109Vue . prototype . $loading = Loading . service ;
108110Vue . prototype . $message = Message ;
You can’t perform that action at this time.
0 commit comments