Files
workspace/code/g3soft-libs/.changeset/slider-captcha.md
T
2026-10-11 22:14:13 +08:00

13 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.
---
'@g3soft/ui': minor
---
新增 `G3SliderCaptcha` 滑块验证码。
- 按住手柄拖到**行内结束端**即通过;`v-model` 绑 `boolean`,`success` 在通过瞬间触发一次,`resume()` 供校验失败后复位。
- 拖拽走 Pointer Events + `setPointerCapture`(与 `bindDrag` / `bindResize` 同一套),指针移出组件、触屏、手写笔都能正确收尾,不往 `document` 挂全局监听。
- 键盘可达:`role="slider"` + `aria-valuenow` / `aria-valuetext`,← → 微调、Home 复位、End 直达终点(`keyboard={false}` 可关)。
- RTL:位置用逻辑属性 `inset-inline-start`,位移按行内方向折算,方向键左右随方向翻转。
- 文案走语言包(新增 `captcha` 分组:`slide` / `verified` / `sliderLabel`),`text` / `successText` 只作覆盖;`size` 支持 small / medium / large。
- 附单测(拖拽 / 回弹 / 禁用 / 键盘 / RTL / 受控 / resume)与真浏览器 e2e(真实指针拖拽、回弹、RTL 起步边),文档见 `docs/content/ui/form/slider-captcha.md`。