|
@ -89,7 +89,7 @@ export default { |
|
|
// console.log(this.$parent.$refs.scrollContainer,'this.$refs.sc--rollContainer--'); |
|
|
// console.log(this.$parent.$refs.scrollContainer,'this.$refs.sc--rollContainer--'); |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
...mapState(['pageTitle']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
...mapState(['pageTitle', 'carryParam']) // 从Vuex映射showSidebar状态到组件的计算属性中 |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
random() { |
|
|
random() { |
|
@ -204,12 +204,17 @@ export default { |
|
|
// 如果 是同一页面 只是页面区域的滚动展示 那么跳转一级路由 |
|
|
// 如果 是同一页面 只是页面区域的滚动展示 那么跳转一级路由 |
|
|
let path = item1.path || item.path; |
|
|
let path = item1.path || item.path; |
|
|
if ( this.$route.path !== path) { |
|
|
if ( this.$route.path !== path) { |
|
|
// 携带当前所有参数跳转 |
|
|
if(this.carryParam){ |
|
|
this.$router.push({ |
|
|
// 携带当前所有参数跳转 |
|
|
path: path, |
|
|
this.$router.push({ |
|
|
query: { ...this.$route.query }, // 携带所有查询参数 |
|
|
path: path, |
|
|
params: { ...this.$route.params } // 携带所有路由参数 |
|
|
query: { ...this.$route.query }, // 携带所有查询参数 |
|
|
}); |
|
|
params: { ...this.$route.params } // 携带所有路由参数 |
|
|
|
|
|
}); |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.$router.push(path); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
store.commit('SET_PAGETITLE', item.name); |
|
|
store.commit('SET_PAGETITLE', item.name); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|