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 });