Vue3.0+antd 全局引入
Vue3.0+antd 全局引入样式和图标全局引入
·
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 新增代码:引入全部组件及样式
import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.css";
import * as Icons from "@ant-design/icons-vue";
const icons: any = Icons;
import './style/reset.scss'
const app = createApp(App)
app.use(Antd)
app.use(store)
app.use(router)
app.mount('#app')
// 全局注册图标
for (const i in icons) {
app.component(i, icons[i]);
}
更多推荐
已为社区贡献17条内容
所有评论(0)