impl pop to root

This commit is contained in:
王劲鹏
2021-06-10 11:31:46 +08:00
committed by osborn
parent ab0ab98aaa
commit dbbc7db31a
2 changed files with 27 additions and 1 deletions

View File

@@ -175,4 +175,16 @@ ApplicationWindow {
navbar.visible = false
}
}
function navigatorPopToRoot() {
while (stack.depth > 1) {
stack.pop()
}
if (stack.depth > 1) {
navbar.visible = true
} else {
navbar.visible = false
}
}
}