main.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { createApp } from 'vue'
  2. import { initStore } from './store'
  3. import { initRouter } from './router'
  4. import App from './App.vue'
  5. //ele
  6. import ElementPlus from 'element-plus'
  7. import 'element-plus/dist/index.css'
  8. import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
  9. import '@/styles/global.scss'
  10. import vue3TreeOrg from 'vue3-tree-org';
  11. import "vue3-tree-org/lib/vue3-tree-org.css";
  12. import 'froala-editor/js/plugins.pkgd.min.js';
  13. //Import third party plugins
  14. import 'froala-editor/js/third_party/embedly.min';
  15. import 'froala-editor/js/third_party/font_awesome.min';
  16. import 'froala-editor/js/third_party/spell_checker.min';
  17. import 'froala-editor/js/third_party/image_tui.min';
  18. // Import Froala Editor css files.
  19. import 'froala-editor/css/froala_editor.pkgd.min.css';
  20. import 'froala-editor/css/froala_style.min.css';
  21. import icons from '@/utils/icon.js'
  22. import moment from 'moment';
  23. import 'moment/dist/locale/zh-cn'; // 引入中文语言包
  24. // 设置全局默认语言环境为简体中文
  25. moment.locale('zh-cn');
  26. import VueFroala from 'vue-froala-wysiwyg';
  27. import {registerComponents} from "@/utils/registryComponents"
  28. import 'vue-datepicker-next/index.css';
  29. import 'vue-datepicker-next/locale/zh-cn';
  30. function setupApp() {
  31. const app = createApp(App)
  32. initStore(app)
  33. app.config.globalProperties.$icons = icons
  34. initRouter(app)
  35. // 注册全局组件
  36. registerComponents(app)
  37. app.use(ElementPlus,{locale: zhCn,size: 'large'})
  38. app.use(vue3TreeOrg)
  39. app.use(VueFroala);
  40. app.mount('#app')
  41. }
  42. setupApp()