docs: clarify typed example callbacks and delegation contracts

This commit is contained in:
2026-11-12 21:20:10 +08:00
parent c3e7d01c09
commit 40b43ac3c3
6 changed files with 9 additions and 4 deletions
+1
View File
@@ -21,6 +21,7 @@ rect = TaggedRect(180, 60, "省略 radius/color 后的字段")
// kind 是原生 Event 参数,第二个字符串才是 TaggedEvent 的源字段 tag。
event = TaggedEvent("click", "事件字段")
// 前两个托管对象归入原生 ObjectList 成员,末尾字符串留给子类字段,不作为第三个列表成员。
// TaggedList.tag 是该列表实例的业务字段;它既不改变 items.count,也不会参与 rect 的容器布局。
items = TaggedList(rect, event, "列表成员之后的字段")
actions = Actions(rect)
button = Button("调用原对象方法")