吉安感知网项目-前端
shuishen
2026-02-02 f0ddb4e8e61a2dd1918d8d7d59c2cf28ac22eda1
1
2
3
4
5
6
7
8
9
10
export default {
    install(app) {
        // 查找所有js
        const components = import.meta.glob('./*.js', { eager: true })
        for (const [path, module] of Object.entries(components)) {
            const name = path.split('/').pop()?.replace('.js', '') || ''
            app.directive(name, module.default)
        }
    },
}