我從/audit ==> /auditlist
$router.back(-1) 卻返回到了 / 就是默認(rèn)的首頁(yè),請(qǐng)問(wèn)什么毛病
routes: [
{ path: '',
component: Home,
children: [
{ path: '/',
component: Explorer, name: "Explorer"
},
{ path: '/audit',
component: Audit, name: "Audit",
},
{ path: '/auditlist',
component: AuditList, name: "AuditList"
},
]
},
{ path:'/login',
component: Login, name: "Login",
}
]
1 回答

幕布斯7119047
TA貢獻(xiàn)1794條經(jīng)驗(yàn) 獲得超8個(gè)贊
這個(gè)得看你的點(diǎn)擊歷史了。
正常都是通過(guò)window.history.length來(lái)判斷是否存在上一級(jí)
如果沒(méi)有 則直接首頁(yè)
添加回答
舉報(bào)
0/150
提交
取消