消毒机设备
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.7 KiB

4 weeks ago
4 weeks ago
4 weeks ago
4 weeks ago
2 months ago
3 weeks ago
2 months ago
3 weeks ago
2 months ago
4 weeks ago
  1. import 'element-plus/dist/index.css'
  2. import 'assets/styles/main.scss'
  3. import * as ElementPlusIconsVue from '@element-plus/icons-vue'
  4. import BTButton from 'components/common/BTButton/index.vue'
  5. import FtButton from 'components/common/FTButton/index.vue'
  6. import FtDialog from 'components/common/FTDialog/index.vue'
  7. import FtInput from 'components/common/FTInput/index.vue'
  8. import FtTable from 'components/common/FTTable/index.vue'
  9. import ElementPlus from 'element-plus'
  10. import locale from 'element-plus/es/locale/lang/zh-cn'
  11. import ErrorBox from 'libs/modalUtil'
  12. import pinia from 'stores/index'
  13. import { createApp } from 'vue'
  14. import { createI18n } from 'vue-i18n'
  15. import App from './app.vue'
  16. import type { LocaleType } from './lang'
  17. import { defaultLocale, messages } from './lang'
  18. import router from './router'
  19. // 创建 i18n 实例
  20. const i18n = createI18n<{
  21. locale: LocaleType
  22. messages: {
  23. en: typeof messages.en
  24. zh: typeof messages.zh
  25. }
  26. }>({
  27. legacy: false,
  28. locale: (localStorage.getItem('locale') as LocaleType) || defaultLocale,
  29. fallbackLocale: 'en',
  30. messages,
  31. })
  32. const app = createApp(App)
  33. for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  34. app.component(key, component)
  35. }
  36. app.directive('prevent-keyboard', {
  37. mounted(el) {
  38. console.log('el---', el)
  39. // 阻止输入框自动聚焦
  40. // el.querySelector('input').setAttribute('readonly', 'readonly')
  41. },
  42. })
  43. app.config.warnHandler = () => null
  44. app.use(pinia)
  45. app.use(ErrorBox)
  46. app.component('BtButton', BTButton)
  47. app.component('FtTable', FtTable)
  48. app.component('FtButton', FtButton)
  49. app.component('FtDialog', FtDialog)
  50. app.component('FtInput', FtInput)
  51. app.use(router).use(i18n).use(ElementPlus, { locale, zIndex: 3000 }).mount('#app')