- withLoginInfo 改为接收完整 opts(含 method/headers/params) - 等待 login_window 的 destroy 事件(=登录成功信号) - 登录成功后重试原始请求 - 重试仍401则返回null(避免死循环) - 用户手动关闭登录窗口时也触发重试,401则返回null
1.2 KiB
1.2 KiB
Running
Widget Functionality: Displays an animation indicating ongoing activity (e.g., loading) and shows the elapsed time in real-time. Commonly used to inform users that an operation is in progress.
Type: Standard widget
Parent Widget: bricks.BaseModal
Initialization Parameters
| Parameter | Type | Description |
|---|---|---|
| target | Optional, any type | Specifies the target element or context (not directly used in current code, possibly handled by parent class) |
| icon | String | URL of the running animation icon; if not provided, defaults to the built-in resource running.gif |
| auto_open | Boolean (automatically set to true) | Determines whether the modal opens automatically; this widget enforces it as true |
| anchor | String (fixed as 'cc') | Positioning anchor point, meaning center-center alignment |
Note:
auto_openandanchorare internally set within the constructor and should not be manually passed when instantiating.
Main Events
No custom events are defined. However, it inherits behaviors from bricks.BaseModal:
- dismiss(): Closes the modal and cleans up scheduled tasks. Invoking this method stops the time counter and executes the parent class's closing logic.