mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-01 14:38:07 +08:00
29 lines
699 B
Go
29 lines
699 B
Go
|
import { App } from 'vue';
|
||
|
import copy from './modules/copy';
|
||
|
import waterMarker from './modules/water-marker';
|
||
|
import draggable from './modules/draggable';
|
||
|
import debounce from './modules/debounce';
|
||
|
import throttle from './modules/throttle';
|
||
|
import longpress from './modules/longpress';
|
||
|
|
||
|
const directivesList: any = {
|
||
|
// Custom directives
|
||
|
copy,
|
||
|
waterMarker,
|
||
|
draggable,
|
||
|
debounce,
|
||
|
throttle,
|
||
|
longpress,
|
||
|
};
|
||
|
|
||
|
const directives = {
|
||
|
install: function (app: App<Element>) {
|
||
|
Object.keys(directivesList).forEach((key) => {
|
||
|
// 注册所有自定义指令
|
||
|
app.directive(key, directivesList[key]);
|
||
|
});
|
||
|
},
|
||
|
};
|
||
|
|
||
|
export default directives;
|