然后一刀戳死 bug
关于 elementUI+vue 导航栏跳不到对应的路由,求救
<template>
<el-container style="height: 500px; border: 1px solid #eee">
<el-aside width="200px" style="background-color: rgb(238, 241, 246)">
<el-menu class="el-menu-vertical-demo"
:default-active="defaultActive"
router>
<el-submenu :index="college.collegeId"
v-for="college in show.college">
<template slot="title">
<i class="el-icon-location"></i>
<span>{{college.collegeName}}</span>
</template>
<el-menu-item :index="professional.professionalId"
v-for="professional in college.professionalList">
{{professional.professionalName}}
</el-menu-item>
</el-submenu>
</el-menu>
</el-aside>
<el-container>
<el-main>
<router-view></router-view>
</el-main>
</el-container>
</el-container>
</template>
<script>
export default {
name: "aside1",
data() {
略
},
computed: {
defaultActive: function(){
return this.$route.path.replace('/', '');
}
},
}
</script>
这是 router 的
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
const collegePage = r => require.ensure([], () => r(require('@/page/collegePage')), 'collegePage');
const routes = [
{
path: '/',
children:[
{
path: '/:id',
component: collegePage
}
]
},{
path:'/:id',
component:collegePage
}
]
export default new Router({
mode:'history',
routes,
strict: process.env.NODE_ENV !== 'production',
})
数据都可以显示,url 地址也的确变成了 http://localhost:8080/0201
但是主题就是显示不出来
1
leo1211 2019-06-15 15:19:41 +08:00 via Android
VR 帮你啊老弟 还是多看点积极健康的哈
|
2
Valid 2019-06-15 16:13:06 +08:00
你需要一条项链,然后戳一下回车键
|
3
Valid 2019-06-15 16:13:13 +08:00
@Valid ![UTOOLS1560586378455.png]( https://img03.sogoucdn.com/app/a/100520146/716bfc1f31fd2bf9fc370fcd51ad241d)
|
4
azh7138m 2019-06-15 16:16:33 +08:00
我还以为是进去找老婆(笑
|
5
ryd994 2019-06-15 16:32:07 +08:00
你确定不是你被 bug 戳死?
|
6
elementpps1 2019-06-18 10:29:02 +08:00
一般电影里都是病毒杀死了创世主
|