Loading

vue开发【下载依赖】【分页英文变中文】

1.创建vue项目

npm create vue@latest

2.下载依赖

cd "项目根目录"
npm install axios element-plus
npm install

3.main.js中引入包

// 引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(ElementPlus)
// 分页英文变中文
import zhCn from 'element-plus/es/locale/lang/zh-cn';
app.use(ElementPlus, { locale: zhCn });
posted @ 2024-09-12 02:45  一只大学生  阅读(47)  评论(0编辑  收藏  举报