UNPKG

@degal-directive/dragdialog

Version:

弹窗框拖拽移动和改变大小指令

20 lines (16 loc) 509 B
import { dialogDrag, dialogChange } from './drag' export default function DragDialog(Vue) { if (window.Vue) { window['drag'] = dialogDrag window['dialogDrag'] = dialogDrag window['dialogChange'] = dialogChange } const install = function (Vue) { // v-dialogDrag: 弹窗拖拽属性 Vue.directive('dialogDrag', dialogDrag) Vue.directive('drag', dialogDrag) // v-dialogChange: 弹窗拖拽大小变化 Vue.directive('dialogChange', dialogChange) } Vue.use(install) }