bricks/dist/docs/en/dynamiccolumn.md
yumoqing 2e22085122 feat: 401后登录成功自动重试原始请求
- withLoginInfo 改为接收完整 opts(含 method/headers/params)
- 等待 login_window 的 destroy 事件(=登录成功信号)
- 登录成功后重试原始请求
- 重试仍401则返回null(避免死循环)
- 用户手动关闭登录窗口时也触发重试,401则返回null
2026-05-27 15:39:34 +08:00

1.5 KiB

DynamicColumn

Control Function: A dynamic column layout container that automatically adjusts the number of grid columns and column width based on screen size and configuration. Suitable for responsive layout scenarios.
Type: Container Control
Parent Control: Layout

Initialization Parameters

Parameter Type Description
col_cwidth Number (Optional) The character width unit per column (based on charsize), used to calculate column width. If neither col_cwidth nor col_width is set, defaults to 20.
col_width Number (Optional) Fixed pixel width per column. Lower priority than col_cwidth.
col_cgap Number (Optional) Gap size between columns, measured in charsize units. Defaults to 0.5.
mobile_cols Number (Optional) Forced number of columns in mobile portrait mode. Defaults to 1.

Note: If neither col_cwidth nor col_width is provided, col_cwidth defaults to 20.

Main Events

  • on_parent
    Triggered when the control is added to a parent container. Used for initialization or recalculating column widths.

  • resize
    Triggered when the browser window size changes. Dynamically adjusts gridTemplateColumns and gap to fit the new dimensions.

  • charsize (from bricks.app)
    Triggered when the character size changes (usually due to font or zoom changes). Used to recalculate column widths and gaps based on character units.