index.ts 602 B

123456789101112131415161718192021222324
  1. import { setupDirective } from '@/directive'
  2. import { setupI18n } from '@/lang'
  3. import { setupRouter } from '@/router'
  4. import { setupStore } from '@/store'
  5. import type { App } from 'vue'
  6. import { setupElIcons } from './icons'
  7. import { setupPermission } from './permission'
  8. export default {
  9. install(app: App<Element>) {
  10. // 自定义指令(directive)
  11. setupDirective(app)
  12. // 路由(router)
  13. setupRouter(app)
  14. // 状态管理(store)
  15. setupStore(app)
  16. // 国际化
  17. setupI18n(app)
  18. // Element-plus图标
  19. setupElIcons(app)
  20. // 路由守卫
  21. setupPermission()
  22. }
  23. }