index.js 482 B

123456789101112131415161718
  1. import hasRole from './permission/hasRole'
  2. import hasPermi from './permission/hasPermi'
  3. import dialogDrag from './dialog/drag'
  4. const install = function(Vue) {
  5. Vue.directive('hasRole', hasRole)
  6. Vue.directive('hasPermi', hasPermi)
  7. Vue.directive('dialogDrag', dialogDrag)
  8. }
  9. if (window.Vue) {
  10. window['hasRole'] = hasRole
  11. window['hasPermi'] = hasPermi
  12. window['dialogDrag'] = dialogDrag
  13. Vue.use(install); // eslint-disable-line
  14. }
  15. export default install