This commit is contained in:
李志鹏
2026-05-15 11:09:36 +08:00
parent 9235843f25
commit 99af8da607
3 changed files with 17 additions and 8 deletions

View File

@@ -2,7 +2,9 @@ import type { App } from 'vue'
export default {
install(app: App) {
const directivesList = import.meta.glob('./*.ts', { eager: true }) as any;
const directivesList1 = import.meta.glob('./*.ts', { eager: true }) as any;
const directivesList2 = import.meta.glob('./*.js', { eager: true }) as any;
const directivesList = { ...directivesList1, ...directivesList2 };
Object.keys(directivesList).forEach(key => {
app.directive(directivesList[key].default.name, directivesList[key].default);
});