import useUserStore from '@/store/modules/user'

export default {
  mounted(el, binding) {
    const { value } = binding
    const userId = useUserStore().userId
    if(value){
      if(value !== userId) {
        el.parentNode && el.parentNode.removeChild(el)
      }
    }else{
      throw new Error(`请设置角色权限Id`)
    }
  }
}