import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import Antd from 'ant-design-vue'
import * as antIcons from '@ant-design/icons-vue'
import 'ant-design-vue/dist/antd.css';
const app = createApp(App);
const antIconsList: any = antIcons;
for (const key in antIconsList) {
app.component(key, antIconsList[key])
}
app.config.globalProperties.$antIcons = antIcons;
app.use(router).use(createPinia()).use(Antd).mount('#app')
<component :is="proxy.$antIcons[item.meta.icon]" />
import { getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
export const Home = [
{
path: '/index',
name: 'index',
meta: {
title: '首页',
hide: false,
icon: 'HomeOutlined'
},
redirect: `/home`,
component: () => import('../views/home/index.vue'),
children: [
{
path: '/home',
name: 'home',
meta: {
title: '系统首页',
hide: false
},
component: () => import('../views/home/home.vue')
}
]
}
]