index.js 717 B

123456789101112131415161718192021222324
  1. import hasRole from './permission/hasRole'
  2. import hasPermi from './permission/hasPermi'
  3. import dialogDrag from './dialog/drag'
  4. import dialogDragWidth from './dialog/dragWidth'
  5. import dialogDragHeight from './dialog/dragHeight'
  6. import clipboard from './module/clipboard'
  7. const install = function(Vue) {
  8. Vue.directive('hasRole', hasRole)
  9. Vue.directive('hasPermi', hasPermi)
  10. Vue.directive('clipboard', clipboard)
  11. Vue.directive('dialogDrag', dialogDrag)
  12. Vue.directive('dialogDragWidth', dialogDragWidth)
  13. Vue.directive('dialogDragHeight', dialogDragHeight)
  14. }
  15. if (window.Vue) {
  16. window['hasRole'] = hasRole
  17. window['hasPermi'] = hasPermi
  18. Vue.use(install); // eslint-disable-line
  19. }
  20. export default install