Refactor: results expose Element as a named field

Every component result type now names its element Element instead of
embedding *ui.Element. The eleven element-plus-changed results
(AccordionView, CarouselView, CollapsibleView, ImageViewerView,
PaginationResult, StepsResult, SidebarResult, TabsResult, RatingParts,
FileDropZoneParts, TransferParts) fold into ChoiceResult.

Fixes four Gallery demos where .Width(...).Changed() read the element's
flag instead of the component's: Accordion, MultiSelect, Cascader,
TreeSelect. TestDataAccordionDemoLogsChange covers the Accordion.
This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 13:35:53 -04:00
1 parent 078dcab8b4
commit 8880865021
73 files changed
+163 -245

No files matched your search

+2 -2
View File
@@ -19,7 +19,7 @@ ui.Render(view, 400, 300, 1)
## 参数
`func Collapsible(c *ui.Context, open *bool, opts CollapsibleOptions, content func()) CollapsibleView`。
`func Collapsible(c *ui.Context, open *bool, opts CollapsibleOptions, content func()) ChoiceResult`。
| 字段 | 类型 | 默认值 | 含义 |
| --- | --- | --- | --- |
@@ -33,7 +33,7 @@ ui.Render(view, 400, 300, 1)
## 事件
`CollapsibleView.Changed()`:用户点击或按键切换了展开状态。
`ChoiceResult.Changed()`:用户点击或按键切换了展开状态。
## 键盘操作