elementui3 使用图标icon
安装icon
# Choose a package manager you like. # NPM $ npm install @element-plus/icons-vue # Yarn $ yarn add @element-plus/icons-vue # pnpm $ pnpm install @element-plus/icons-vue
安装完成后在使用的页面加载使用的图标
import { Plus, ZoomIn, Download, Delete } from "@element-plus/icons-vue";
然后
components: {
Plus, ZoomIn, Download, Delete
},
然后
<el-icon><plus/></el-icon>
<el-icon><zoom-in /></el-icon>
<el-icon><download /></el-icon>
<el-icon><delete /></el-icon>
吐槽一下...
官方文档真的很官方啊
https://element-plus.gitee.io/zh-CN/component/icon.html#using-packaging-manager