import type { App } from 'vue';
import { authDirective } from '@/directive/authDirective';
import { wavesDirective, lazyImgDirective, inputTrimDirective } from '@/directive/customDirective';
import { horizontalScroll } from '@/directive/tableScorll';
import { permissionDirective } from '@/directive/permissionAuth';

/**
 * 导出指令方法：v-xxx
 * @methods authDirective 用户权限指令，用法：v-auth
 * @methods wavesDirective 按钮波浪指令，用法：v-waves
 * @methods lazyImgDirective 图片懒加载指令，用法：v-lazy
 * @methods inputTrimDirective 输入框去除两边空格，用法：v-trim
 * @methods horizontalScroll 表格滚动条指令 ，用法：v-horizontal-scroll
 */
export function directive(app: App) {
	// 用户权限指令
	authDirective(app);
	// 用户权限指令
	permissionDirective(app);
	// 按钮波浪指令
	wavesDirective(app);
	// 图片懒加载指令
	lazyImgDirective(app);
	// 表格滚动条
	horizontalScroll(app);
	// 输入框去除两边空格
	inputTrimDirective(app);
}
