- withLoginInfo 改为接收完整 opts(含 method/headers/params) - 等待 login_window 的 destroy 事件(=登录成功信号) - 登录成功后重试原始请求 - 重试仍401则返回null(避免死循环) - 用户手动关闭登录窗口时也触发重试,401则返回null
1.9 KiB
Tabular
Widget Functionality: Used to display data in a tabular format, supporting features such as row selection, checkbox state change events, dynamic content expansion, etc. Suitable for presenting and interacting with data lists.
Type: Regular widget (container-type data display widget)
Parent Widget: bricks.DataViewer
Initialization Parameters
opts{Object}: Initialization options object, inheriting parameters fromDataViewer, with the following additional properties:row_options{Object}: Defines rendering configurations for each data row, including fields (fields), height (cheight), etc.content_view{Object|undefined}: Optional. Specifies the detailed content view description (JSON structure) to be expanded when a row is clicked. If provided, enables collapsible panel functionality.editexclouded{Array}: Optional. An array of field names that should not be displayed in edit mode.data_params{Object}: Data parameters used to generate hidden fields, typically used in scenarios like form submission.
Main Events
-
row_selected
Trigger Timing: Fired when a row is clicked and selected.
Payload: The data record (recordobject) corresponding to the currently selected row.
Example Use: Can be used to update a detail panel or the state of external widgets. -
row_check_changed
Trigger Timing: Fired when the checkbox state of a row changes.
Payload: The user data (user_data) associated with the row.
Note: Dispatched via binding thecheck_changedevent ofDataRow. Commonly used for handling multi-selection operations. -
Custom Event Forwarding (via
record_event_handle)
Supports bubbling events from child components (e.g., toolbar buttons) to the parent, such as:- Custom events wrapping DOM events like
click,dblclick, etc. - Carries the original record data, enabling business logic to respond appropriately.
- Custom events wrapping DOM events like