mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2026-01-01 02:52:48 +00:00
15 lines
376 B
TypeScript
15 lines
376 B
TypeScript
import type { App } from 'vue'
|
|
|
|
const directives = import.meta.glob('./*.ts', { eager: true })
|
|
const install = (app: App) => {
|
|
Object.keys(directives)
|
|
.filter((key: string) => {
|
|
return !key.endsWith('index.ts')
|
|
})
|
|
.forEach((key: string) => {
|
|
const directive: any = directives[key]
|
|
app.use(directive.default)
|
|
})
|
|
}
|
|
export default { install }
|