emis-frontend/src/directive/index.js
2024-05-26 08:45:32 +08:00

32 lines
1.1 KiB
JavaScript

import hasRole from './permission/hasRole'
import hasPermi from './permission/hasPermi'
import dialogDrag from './dialog/drag'
import dialogDragWidth from './dialog/dragWidth'
import dialogDragHeight from './dialog/dragHeight'
import dialogFullScreen from './dialog/fullScreen'
import clipboard from './module/clipboard'
import elSelectLoadmore from './ext/elSelectLoadmore'
import elTableResizeHeight from './table/resizeHeight'
const install = function(Vue) {
Vue.directive('hasRole', hasRole)
Vue.directive('hasPermi', hasPermi)
Vue.directive('clipboard', clipboard)
Vue.directive('dialogDrag', dialogDrag)
Vue.directive('dialogDragWidth', dialogDragWidth)
Vue.directive('dialogDragHeight', dialogDragHeight)
Vue.directive('dialogFullScreen', dialogFullScreen)
Vue.directive('doTableResizeHeight', elTableResizeHeight)
// v-doTableResizeHeight="{topSearchFormRef: 'queryForm'}"
Vue.directive('el-select-loadmore', elSelectLoadmore);
}
if (window.Vue) {
window['hasRole'] = hasRole
window['hasPermi'] = hasPermi
Vue.use(install); // eslint-disable-line
}
export default install