未验证 提交 64a8fda5 编写于 作者: M mengtiantang 提交者: GitHub

web/src/view/layout/aside/historyComponent: fix 浏览器自带返回按钮点击多次才能返回上一页,...

web/src/view/layout/aside/historyComponent: fix 浏览器自带返回按钮点击多次才能返回上一页, 多次往路由栈push当前页面路由记录的bug (#1311)
Co-authored-by: Nxdefei <13523376917@163.com>
上级 b0255d73
......@@ -5,7 +5,7 @@
:closable="!(historys.length === 1 && $route.name === defaultRouter)"
type="card"
@contextmenu.prevent="openContextMenu($event)"
@tab-change="changeTab"
@tab-click="changeTab"
@tab-remove="removeTab"
>
<el-tab-pane
......@@ -209,7 +209,9 @@ const setTab = (route) => {
const historyMap = ref({})
const changeTab = (name) => {
const changeTab = (TabsPaneContext) => {
const name = TabsPaneContext?.props?.name
if (!name) return
const tab = historyMap.value[name]
router.push({
name: tab.name,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册