2026-05-14 14:23:32 +08:00
|
|
|
import type { App } from 'vue'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
install(app: App) {
|
2026-05-15 11:09:36 +08:00
|
|
|
const directivesList1 = import.meta.glob('./*.ts', { eager: true }) as any;
|
|
|
|
|
const directivesList2 = import.meta.glob('./*.js', { eager: true }) as any;
|
|
|
|
|
const directivesList = { ...directivesList1, ...directivesList2 };
|
2026-05-14 14:23:32 +08:00
|
|
|
Object.keys(directivesList).forEach(key => {
|
|
|
|
|
app.directive(directivesList[key].default.name, directivesList[key].default);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|