bricks/dist/docs/zh/keypress.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

14 lines
508 B
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.

# KeyPress
控件功能:监听键盘按键事件,当用户按下任意键时,清除当前内容并显示按下的键名。
类型:容器控件
父类控件VBox
## 初始化参数
- 无特殊初始化参数,继承自 `bricks.VBox` 的通用参数(如布局相关选项等)。
## 主要事件
- `keydown`:绑定全局键盘按下事件,触发 `key_handler` 方法处理按键逻辑。
在该事件中获取 `event.key` 值,并动态创建显示按键信息的文本控件。