- withLoginInfo 改为接收完整 opts(含 method/headers/params) - 等待 login_window 的 destroy 事件(=登录成功信号) - 登录成功后重试原始请求 - 重试仍401则返回null(避免死循环) - 用户手动关闭登录窗口时也触发重试,401则返回null
1.6 KiB
1.6 KiB
Conform
Control Functionality: Displays a confirmation dialog containing a message and "Confirm" and "Cancel" action buttons, typically used for secondary confirmation before user actions.
Type: Container control
Parent Control: bricks.PopupWindow
Initialization Parameters
| Parameter | Type | Description |
|---|---|---|
message |
String | The message text to display; supports internationalization (i18n) and automatic line wrapping. |
conform |
Object | Optional; customizes the "Confirm" button configuration, such as event handlers, icons, labels, etc. This will be merged into the default configuration. |
discard |
Object | Optional; customizes the "Cancel" button configuration, with behavior similar to conform. |
timeout |
Number | Inherited from parent class, but forcibly set to 0 in this control, meaning auto-closing is disabled. |
auto_open |
Boolean | Inherited from parent class, set to true, indicating that the dialog automatically pops up after construction. |
Note: Other parameters inherited from
PopupWindowinoptsare also applicable, but this control internally overridestimeoutandauto_open.
Main Events
| Event Name | Trigger Timing | Payload Data |
|---|---|---|
conformed |
Triggered when the user clicks the "Confirm" button | No specific data, event notification only |
cancelled |
Triggered when the user clicks the "Cancel" button | No specific data, event notification only |
Events are dispatched via
this.dispatch()and can be listened to by binding event listeners on the instance.