mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-10 19:36:48 +08:00
feat:合并
This commit is contained in:
30
src/App.vue
30
src/App.vue
@@ -2,25 +2,25 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 17:28:10
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-12-13 18:56:24
|
||||
* @LastEditTime: 2022-12-13 20:37:15
|
||||
* @FilePath: /fe-stu/src/App.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<div id="container">
|
||||
<!-- <div id="nav">-->
|
||||
<!-- <router-link-->
|
||||
<!-- v-for="item in routes"-->
|
||||
<!-- :key="item.path"-->
|
||||
<!-- :to="item.path"-->
|
||||
<!-- :class="{-->
|
||||
<!-- link: true,-->
|
||||
<!-- active: name === item.name,-->
|
||||
<!-- }"-->
|
||||
<!-- >-->
|
||||
<!-- {{ item.name }}-->
|
||||
<!-- </router-link>-->
|
||||
<!-- </div>-->
|
||||
<div id="nav">
|
||||
<router-link
|
||||
v-for="item in routes"
|
||||
:key="item.path"
|
||||
:to="item.path"
|
||||
:class="{
|
||||
link: true,
|
||||
active: name === item.name,
|
||||
}"
|
||||
>
|
||||
{{ item.name }}
|
||||
</router-link>
|
||||
</div>
|
||||
<main>
|
||||
<router-view />
|
||||
</main>
|
||||
@@ -34,7 +34,7 @@ export default defineComponent({
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
console.log("router", router.getRoutes(), route);
|
||||
console.log(import.meta.env.DEV)
|
||||
console.log(import.meta.env.DEV);
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user