bricks/docs/zh/running.md
2025-11-19 12:30:39 +08:00

23 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Running
控件功能:显示一个运行中的动画(如加载中)并实时展示已运行的时间,常用于提示用户操作正在进行。
类型:普通控件
父类控件bricks.BaseModal
## 初始化参数
| 参数名 | 类型 | 说明 |
|--------|------|------|
| target | 可选,任意类型 | 指定目标元素或上下文(未在当前代码中直接使用,可能由父类处理) |
| icon | 字符串 | 运行动画的图标 URL若未提供则使用默认的 `running.gif` 资源 |
| auto_open | 布尔值(自动设置为 true | 控制模态框是否自动打开,此控件强制设为 `true` |
| archor | 字符串(固定为 'cc' | 定位锚点表示居中显示center-center |
> 注:`auto_open` 和 `archor` 由构造函数内部设定,调用时无需手动传入。
## 主要事件
无自定义事件定义,但继承了 `bricks.BaseModal` 的相关行为:
- **dismiss()**:关闭并清理定时任务。调用时会停止时间计时器,并执行父类的关闭逻辑。