import hasRole from './hasRole'
import hasPermi from './hasPermi'
import unContent from './unContent'
import loadMore from './loadMore'

const install = function(Vue) {
  Vue.directive('hasRole', hasRole)
  Vue.directive('hasPermi', hasPermi)
  Vue.directive('un-content', unContent)
  Vue.directive('loadmore', loadMore)
}

if (window.Vue) {
  window['hasRole'] = hasRole
  window['hasPermi'] = hasPermi
  Vue.use(install); // eslint-disable-line
}

export default install
