产品分化课程设计页面调整
刷新页面菜单栏选中状态调整
This commit is contained in:
parent
059a4134d5
commit
17ed79b2dd
@ -2,7 +2,7 @@
|
||||
<el-menu
|
||||
class="navbar"
|
||||
router
|
||||
:default-active="$route.path"
|
||||
:default-active="activePath"
|
||||
mode="horizontal"
|
||||
background-color="#545c64"
|
||||
text-color="#fff"
|
||||
@ -24,6 +24,7 @@
|
||||
</template>
|
||||
<template v-else-if="hasOneShowingChildren(item.children) &&!item.alwaysShow">
|
||||
<template :to="item.path+'/'+item.children[0].path">
|
||||
<!-- -->
|
||||
<el-menu-item :key="idx" :index="item.redirect ? item.redirect : (item.path+'/'+item.children[0].path)">
|
||||
<span
|
||||
v-if="item.children[0].meta&&item.children[0].meta.i18n"
|
||||
@ -89,6 +90,7 @@ export default {
|
||||
return {
|
||||
routes: [],
|
||||
isShow:false,
|
||||
activePath:'',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -104,6 +106,15 @@ export default {
|
||||
}
|
||||
else{
|
||||
this.isShow=true;
|
||||
}
|
||||
if(this.$route.fullPath.indexOf('design/userlist')>=0){
|
||||
this.activePath='/design/userlist/home';
|
||||
}
|
||||
else if(this.$route.fullPath.indexOf('design/lesson')>=0 || this.$route.fullPath.indexOf('design/script')>=0 || this.$route.fullPath.indexOf('design/runPlan')>=0){
|
||||
this.activePath='/design/home';
|
||||
}
|
||||
else{
|
||||
this.activePath=this.$route.path;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -407,6 +407,7 @@ export const asyncRouter = [
|
||||
},
|
||||
{
|
||||
path: '/design/userlist',
|
||||
redirect: '/design/userlist/home',
|
||||
component: Layout,
|
||||
meta: {
|
||||
roles: [admin, user, userDesign]
|
||||
|
@ -8,7 +8,7 @@
|
||||
<transition>
|
||||
<!-- position:'relative', -->
|
||||
<!-- :style="{left:widthLeft+'px', width: (width - widthLeft)+'px'}" -->
|
||||
<router-view :product-list="productList" />
|
||||
<router-view :product-list="productList" :style="{width:(width - widthLeft)+'px',display:'inline-block'}"/>
|
||||
</transition>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="mainContext">
|
||||
<div class="draftContext" :style="{width: width +'px'}">
|
||||
<div class="draftContext">
|
||||
<!--:style="{width: width +'px'} -->
|
||||
<div v-if="lessonShow">
|
||||
<lesson-edit ref="lesson" :height="height" @refresh="refresh" />
|
||||
</div>
|
||||
@ -19,6 +20,7 @@ import CourceCategory from './category/tree';
|
||||
import LessonEdit from './edit/lesson/index';
|
||||
import ChapterEdit from './edit/chapter/index';
|
||||
import SortTree from './edit/sorttree/index';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'LessonDraft',
|
||||
@ -40,7 +42,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
width() {
|
||||
return this.$store.state.app.width - 420;
|
||||
return this.$store.state.app.width - localStore.get('LeftWidth');
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height - 102;
|
||||
@ -123,6 +125,6 @@ export default {
|
||||
}
|
||||
|
||||
.draftContext {
|
||||
float: left;
|
||||
// float: left;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user