docs: describe graceful shutdown and show shared exit lifecycle hooks
Verify Tessera GUI / verify (push) Has been cancelled
Verify Tessera GUI / verify (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
class ExitText: TextBlock {
|
||||
log: Object
|
||||
function onUnmount(self: ExitText, mount: Mount): Unit {
|
||||
self.log.increment()
|
||||
}
|
||||
}
|
||||
log = ui.state(0)
|
||||
watched = ExitText("关闭副窗口可观察卸载计数;退出应用也会卸载剩余位置",2,log)
|
||||
page = Page()
|
||||
page.title = "退出生命周期"
|
||||
page.render(Column(24,16,watched,ui.textOf(log,"value")))
|
||||
second = Window()
|
||||
second.setTitle("Exit lifecycle secondary")
|
||||
other = Page()
|
||||
other.render(watched)
|
||||
other.moveToWindow(second)
|
||||
pending = ui.sleep(ui,"pending",30000)
|
||||
Reference in New Issue
Block a user