main.ts 774 B

12345678910111213141516171819202122232425
  1. import { createApp } from 'vue';
  2. import pinia from '@/stores/index';
  3. import App from './App.vue';
  4. import router from './router';
  5. import { directive } from '@/directive';
  6. import other from '@/utils/other';
  7. // 引入element
  8. import ElementPlus from 'element-plus';
  9. import 'element-plus/dist/index.css';
  10. import '@/theme/index.scss';
  11. // 空组件
  12. import Empty from '@/components/Empty/index.vue';
  13. // 表格组件
  14. import ProTable from '@/components/ProTable/index.vue';
  15. import { MotionPlugin } from '@vueuse/motion';
  16. const app = createApp(App);
  17. // 自定义指令和svg组件
  18. directive(app);
  19. other.elSvg(app);
  20. // 全局组件挂载
  21. app.component('Empty', Empty);
  22. app.component('ProTable', ProTable);
  23. app.use(pinia).use(router).use(ElementPlus).use(MotionPlugin).mount('#app');