main.ts 865 B

1234567891011121314151617181920212223242526272829
  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. // 注册echarts
  17. import { registerEcharts } from '@/utils/echarts';
  18. const app = createApp(App);
  19. // 自定义指令和svg组件
  20. directive(app);
  21. other.elSvg(app);
  22. // 全局组件挂载
  23. app.component('Empty', Empty);
  24. app.component('ProTable', ProTable);
  25. registerEcharts(app);
  26. app.use(pinia).use(router).use(ElementPlus).use(MotionPlugin).mount('#app');