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
 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM