import { App, Directive } from 'vue';
import copy from './modules/copy';
import existShow from './modules/existShow';
import vPrint from './modules/print';
import waterMarker from './modules/waterMarker';

const directivesList: { [key: string]: Directive } = { copy, waterMarker, existShow, vPrint };

/**
 * 挂载自定义事件
 */
const directives = {
	install: function (app: App<Element>) {
		Object.keys(directivesList).forEach(key => {
			app.directive(key, directivesList[key]);
		});
	},
};
export default directives;
