element-plus安装以及使用
element-plus时为vue.js 3开发的组件库。
在引入前需要做如下准备
安装node.js
https://blog.csdn.net/zlpzlpzyd/article/details/147704723
安装vue的脚手架vue-cli
https://blog.csdn.net/zlpzlpzyd/article/details/149647351
安装element-plus
github地址
https://github.com/element-plus/element-plus
官网介绍
https://element-plus.org/zh-CN/component/overview.html
全局引入element-plus组件库和样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
引入css重置工具包,由于不同浏览器的css支持不同,此css可以确保不同浏览器展示效果一致
npm install normalize.css
element-plus字体图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {app.component(key, component);
}