赞
踩
- import {
- createApp
- } from 'vue'
- import router from './router'
-
- import ElementPlus from 'element-plus';
-
- import 'element-plus/dist/index.css';
-
- import zhCn from 'element-plus/es/locale/lang/zh-cn' //1 引入中文
-
- import App from './App.vue'
-
- const app = createApp(App)
-
-
- app.use(ElementPlus, {
- locale: zhCn //2 这里使用中文
- }).use(router)
-
- app.mount('#app')
如果引入了ts,是为了防止打包报错,需要加上这个//@ts-ignore 忽略打包类型检查
- import './assets/main.css'
-
- import {
- createApp
- } from 'vue'
- //页面引入store
- import store from './store'
- import App from './App.vue'
- import router from './router'
- import ElementPlus from 'element-plus'
- //配置国际化 下面的注释是为了防止ts检查,导致打包报错,忽略类型检查
- //@ts-ignore
- import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
- import 'element-plus/dist/index.css'
- const app = createApp(App)
- //页面使用
- app.use(store)
- app.use(router)
- app.use(ElementPlus, {
- locale: zhCn, //这是国际化配置,比如分页时候
- })
- app.mount('#app')
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。