|
@@ -3,7 +3,7 @@ import { store } from '@/store'
|
|
export const auth = (app) => {
|
|
export const auth = (app) => {
|
|
app.directive('auth', {
|
|
app.directive('auth', {
|
|
// 当被绑定的元素插入到 DOM 中时……
|
|
// 当被绑定的元素插入到 DOM 中时……
|
|
- bind: function(el, binding) {
|
|
|
|
|
|
+ mounted: function(el, binding) {
|
|
const userInfo = store.getters['user/userInfo']
|
|
const userInfo = store.getters['user/userInfo']
|
|
let type = ''
|
|
let type = ''
|
|
switch (Object.prototype.toString.call(binding.value)) {
|
|
switch (Object.prototype.toString.call(binding.value)) {
|