当前位置: 首页> 科技> 能源 > 女生学软件工程后悔了_w3school网站建设教程_做排名优化_网时代教育培训机构怎么样

女生学软件工程后悔了_w3school网站建设教程_做排名优化_网时代教育培训机构怎么样

时间:2025/7/14 4:18:07来源:https://blog.csdn.net/qq_38810813/article/details/146314989 浏览次数:0次
女生学软件工程后悔了_w3school网站建设教程_做排名优化_网时代教育培训机构怎么样

antd是用的3+版本

<a-menu v-model:selectedKeys="selectedKeys" mode="inline" @click="toPage"><template v-for="i in menus"><a-menu-item v-if="!i.children" :key="i.path"><span>{{ i.name }}</span></a-menu-item><a-sub-menu v-else :key="i.path"><template #title><span>{{i.name}}</span></template><a-menu-item v-for="item in i.children" :key="item.path">{{item.name}}</a-menu-item></a-sub-menu></template>
</a-menu>
import { ref,onMounted } from 'vue';
import {menus} from '@/apis/api/nav.ts'
import { useRouter,useRoute } from 'vue-router';const router = useRouter();
const route = useRoute();
const selectedKeys = ref<string[]>(['/index']);const toPage = (e:any) => {if(e.key!=route.path){router.push({path: e.key})}
}onMounted(()=>{router.push({path: '/index'})
})

nav.ts的配置

export const menus = [
{name:'首页',path:'/index',key:'1'
},
{name:'运营管理',path:'',key:'6',children:[{name:'用户反馈管理',path:'/feedback'}]
},
]
关键字:女生学软件工程后悔了_w3school网站建设教程_做排名优化_网时代教育培训机构怎么样

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: