赞
踩
npm install --save @ant-design/icons-vue
2.在main入口文件引入,不想一个个一得导入,可直接循环导入即可
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import * as Icons from '@ant-design/icons-vue';
const app = createApp(App);
app.use(Antd).use(router).mount('#app')
// 循环使用全部全部图标
const icons: any = Icons;
for (const i in icons) {
// 全局注册一下组件
app.component(i, icons[i])
}
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。