Skip to content

Commit d38faff

Browse files
author
幾米
committed
支持手势、按钮前进后退浏览历史
1 parent f79faa8 commit d38faff

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎box/chavy.boxjs.html‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,16 +1735,20 @@ <h2 :class="version === ver.version ? 'primary--text' : undefined">v{{ver.versio
17351735
},
17361736
// 切换应用视图
17371737
switchAppView(appId) {
1738-
this.path = `/app/${appId}`
1738+
const path = `/app/${appId}`
1739+
this.path = path
1740+
this.handleHistory(path)
17391741
},
17401742
// 切换备份视图
17411743
switchBakView(bakId) {
17421744
const bak = this.baks.find((bak) => bak.id === bakId)
1745+
const path = `/bak/${bakId}`
17431746
if (!bak.bak) {
1744-
this.loadGlobalBak().then((resp) => (this.path = `/bak/${bakId}`))
1747+
this.loadGlobalBak().then((resp) => (this.path = path))
17451748
} else {
1746-
this.path = `/bak/${bakId}`
1749+
this.path = path
17471750
}
1751+
this.handleHistory(path)
17481752
},
17491753
// 重载主题
17501754
loadTheme() {

0 commit comments

Comments
 (0)