手写版本
文件leftNav.vue
<template>
<!-- <a-switch
:checked="theme === 'dark'"
checked-children="Dark"
un-checked-children="Light"
@change="changeTheme"
/> -->
<a-menu v-model:openKeys="openKeys"
v-model:selectedKeys="selectedKeys"
mode="inline"
:theme="theme"
@click="handleClick">
<template v-for="item in menuList">
<a-sub-menu :key="item.id" @titleClick="titleClick" v-if="item.children">
<template #icon>
<component :is="$antIcons[item.icon]" />
</template>
<template #title>{
{item.name + item.id}}</template>
<template :key="sitem.id" v-for="