Connect native tab chrome to managed Page methods
Verify Tessera GUI / verify (push) Failing after 7m37s
Verify Tessera GUI / verify (push) Failing after 7m37s
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
// Code and tab chrome operate the same Page objects.
|
||||
first = Page()
|
||||
first.title = "共享计数"
|
||||
count = ui.state(0)
|
||||
increment = Button("加一")
|
||||
connection = increment.on("click", count.increment)
|
||||
first.render(Column(24,16,TextBlock("切换页面后,计数对象继续存在"),ui.textOf(count,"value"),increment))
|
||||
|
||||
second = Page()
|
||||
second.title = "另一个页面"
|
||||
second.render(Column(24,16,TextBlock("点击上方 Tab 切换;× 关闭页面"),TextBlock("Ctrl+Tab 切换,Cmd/Ctrl+W 关闭;代码可调用 first.open() 重开")))
|
||||
|
||||
third = Page()
|
||||
third.title = "窗口与布局"
|
||||
third.render(Column(24,16,TextBlock("每个 Tab 都是同一个 VM 中的 Page 对象"),RectBlock(240,80,8,"#237A45")))
|
||||
first.activate()
|
||||
ui.window().setTitle("Endor Pages")
|
||||
Reference in New Issue
Block a user