EInputOtp 验证码输入
示例与代码
验证码输入
属性
属性说明取值与默认值
enabledbool是否允许交互;false 时控件禁用。
默认值
trueheightreal组件尺寸,单位为像素;可绑定父布局尺寸。
默认值
implicitHeightlengthint验证码长度或 OTP 输入位数。
默认值
6maskedbool隐藏 OTP 字符。
默认值
falsenumericOnlyboolOTP 仅接受数字。
默认值
truesizeint控件尺寸;默认继承最近的 EConfigProvider。
EStyle.SmallEStyle.MediumEStyle.Large
默认值
继承 Provider,默认 EStyle.Mediumvaluestring当前值;通过属性绑定读写,数组形式用于多选或范围选择。
默认值
""visiblebool是否显示组件。
默认值
truewidthreal组件尺寸,单位为像素;可绑定父布局尺寸。
默认值
implicitWidth信号
签名作用
completed(string value)验证码填满时触发,value 为完整验证码。
方法
签名作用
inputAt(index, text)更新 index 对应的验证码输入格,text 为输入内容。