Browse Source

修改侧边高亮

pull/1/head
zq 2 weeks ago
parent
commit
76fc945194
  1. 5
      src/components/SetLeftMenu.vue

5
src/components/SetLeftMenu.vue

@ -10,7 +10,7 @@
<span class="title_text">{{ item.name }}</span> <span class="title_text">{{ item.name }}</span>
</div> </div>
<p :class="['flex', activeFloor == item1.desc ? 'curActive' : '']" v-for="(item1) in item.list" <p :class="['flex', activeFloor == item1.desc ? 'curActive' : '']" v-for="(item1) in item.list"
@click="setActiveCur(item1.desc, item)" :key="item1.name">{{ item1.name }}</p> @click="setActiveCur(item1.desc, item,index)" :key="item1.name">{{ item1.name }}</p>
</li> </li>
</ul> </ul>
</aside> </aside>
@ -186,7 +186,8 @@ export default {
activeArea(type) { activeArea(type) {
console.log(type); console.log(type);
}, },
setActiveCur(dom, item) { setActiveCur(dom, item,index) {
this.curIndex = index;
if (item.path && this.$route.path !== item.path) { if (item.path && this.$route.path !== item.path) {
this.$router.push(item.path); this.$router.push(item.path);
store.commit('SET_PAGETITLE', item.name); store.commit('SET_PAGETITLE', item.name);

Loading…
Cancel
Save