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
@@ -14,7 +14,7 @@ mujica.Tabs(c, &tab, []mujica.Tab{
}, mujica.TabsOptions{Label: "Settings"})
```
签名:`func Tabs(c *ui.Context, selected *int, tabs []Tab, opts TabsOptions) TabsResult`
签名:`func Tabs(c *ui.Context, selected *int, tabs []Tab, opts TabsOptions) ChoiceResult`
## 参数
@@ -36,7 +36,7 @@ mujica.Tabs(c, &tab, []mujica.Tab{
| `Vertical` | `bool` | false | 标签竖排在左侧,面板在右侧。 |
| `Label` | `string` | "" | 标签列表的无障碍名称。 |
返回 `TabsResult`,内嵌包含标签与面板的 `*ui.Element`。
返回 `ChoiceResult`,`Element` 字段是包含标签与面板的元素。
## 状态