vue3中引入element-plus的 @element-plus/icons-vue.(已成功)
vue3中引入element-plus的 @element-plus/icons-vue最近使用element-plus开发项目,@element-plus/icons-vue 全局安装依据官网(官网地址)的使用方法不知道什么原因 icon 的 样式一直不显示,搞了半天,不知道什么原因又好了,贴一下代码。安装NPM$ npm install @element-plus/icons-vue全局引用m
·
vue3中引入element-plus的 @element-plus/icons-vue
最近使用element-plus开发项目,@element-plus/icons-vue 全局安装
依据官网(官网地址)的使用方法不知道什么原因 icon 的 样式一直不显示,搞了半天,不知道什么原因又好了,贴一下代码。
安装
NPM
$ npm install @element-plus/icons-vue
全局引用
main.ts里面导入引入 icon
import * as Elicons from "@element-plus/icons-vue";
const app = createApp(App);
for (const name in Elicons) {
app.component(name, Elicons[name]);
}
更多推荐
已为社区贡献1条内容
所有评论(0)