
(vue)vue3使用element
element
A Vue.js 2.0 UI Toolkit for Web
项目地址:https://gitcode.com/gh_mirrors/eleme/element
·
(vue)vue3使用element
element-ui支持vue2版本,当vue3项目安装element-ui的时候会报错,应安装element-plus版本。
element-ui网址:https://element.eleme.cn/#/zh-CN/
element-plus网址:https://element-plus.gitee.io/zh-CN/
1、首先安装element-plus
npm install element-plus --save
package.json文件中查看

2、修改main.js或main.ts文件
import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
import locale from 'element-plus/lib/locale/lang/zh-cn'
createApp(App).use(store).use(router).use(scroll).use(ElementPlus, { locale }).mount("#app");
3、代码中使用

效果:

解决参考:https://blog.csdn.net/qq_53966155/article/details/126144035
A Vue.js 2.0 UI Toolkit for Web
最近提交(Master分支:5 个月前 )
c345bb45
9 个月前
a07f3a59
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update transition.md
* Update table.md
* Update table.md
* Update transition.md
* Update popover.md 9 个月前
更多推荐




所有评论(0)