|
@@ -116,8 +116,10 @@ import path from 'path'
|
|
|
import auth from '@/utils/auth'
|
|
|
import Cookies from 'js-cookie'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
+import RouterHelpMixin from '@/router/router-help-mixin'
|
|
|
|
|
|
export default {
|
|
|
+ mixins: [RouterHelpMixin],
|
|
|
data() {
|
|
|
return {
|
|
|
// 顶部栏初始数
|
|
@@ -310,7 +312,7 @@ export default {
|
|
|
auth.setMenuListAction(actionMenu)
|
|
|
} else {
|
|
|
console.log('routes', routes)
|
|
|
- let path = this.gouAction(routes)
|
|
|
+ let path = this.findLeafDescendantPath(routes)
|
|
|
if (path) {
|
|
|
this.$router.push({ path: path })
|
|
|
auth.setMenuListAction(path)
|
|
@@ -319,6 +321,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
gouAction(data) {
|
|
|
+ // 22.6.7 hht 作废此方法,只处理了有限级跳转
|
|
|
if (data && data.length > 0) {
|
|
|
if (data[0].children && data[0].children.length > 0) {
|
|
|
if (
|