VirtualList (Dynamic)
ui.widgets.VirtualList行高不一的虚拟列表。A virtual list with variable row heights.
BEHAVIOR CONTRACT
测量、估算与滚动锚点保证变高行滚动时不跳动。Measurement, estimation and scroll anchoring keep variable rows from jumping.
RECORDED INTERACTION
Harness 滚动变高列表。The harness scrolls the variable-height list.
pub fn buildVirtualListDynamic(scope: *ui.Scope, cx: *ui.Cx) anyerror!*ui.Node {
const vl = try W.VirtualList(.{
.item_count = 2000,
.measure_items = true,
.estimate_item_height = 44,
.width = 320,
.height = 360,
}).mount(scope, cx, vlDynRender);
return vl.container;
}这是 Storybook 中该 story 的原样代码(zenit 5f9add5+wip 2026-09-30)。其中 W 即 ui.widgets,col / row / label 是 Storybook 内的布局小工具。The story's verbatim source from the Storybook (zenit 5f9add5+wip 2026-09-30). W is ui.widgets; col / row / label are small Storybook layout helpers.