mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-30 22:40:48 +00:00
25 lines
711 B
JavaScript
25 lines
711 B
JavaScript
import directive from './directives';
|
|
|
|
const importDirective = (Vue) => {
|
|
/**
|
|
* 拖拽指令 v-draggable="options"
|
|
* options = {
|
|
* trigger: /这里传入作为拖拽触发器的CSS选择器/,
|
|
* body: /这里传入需要移动容器的CSS选择器/,
|
|
* recover: /拖动结束之后是否恢复到原来的位置/
|
|
* }
|
|
*/
|
|
Vue.directive('draggable', directive.draggable);
|
|
/**
|
|
* clipboard指令 v-draggable="options"
|
|
* options = {
|
|
* value: /在输入框中使用v-model绑定的值/,
|
|
* success: /复制成功后的回调/,
|
|
* error: /复制失败后的回调/
|
|
* }
|
|
*/
|
|
Vue.directive('clipboard', directive.clipboard);
|
|
};
|
|
|
|
export default importDirective;
|