Vue3.0商店後臺管理系統項目實戰-導航的icon圖標

參考資料

Vue3.0官方文檔:https://cn.vuejs.org/
Element Plus文檔:https://element-plus.gitee.io/zh-CN/
Element Plus 提供了一套常用的圖標集合。

1:安裝

# NPM
$ npm install @element-plus/icons-vue

2:在main.js引入


main.js

import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import App from './App.vue'
import router from './router'
import store from './store'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const app=createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

app.use(store).use(router).use(ElementPlus).mount('#app')


3:基礎用法
點擊圖標進行復制


在這個代碼裏面粘貼即可



查看效果
自己想要的圖標已經放在上面啦


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章