Skip to content

身份证键盘 xKeyboardIdcard


在线预览
在线模拟尺寸:

介绍

自动解析第二代身份证号,验证用户输入的是否正确,事件中能得到当前输入值及校验值。

平台兼容

HarmonyH5andriodIOS小程序UTSUNIAPP-X SDKversion
☑️☑️☑️☑️4.76+1.1.18

文件路径

ts

@/uni_modules/tmx-ui/components/x-keyboard-idcard/x-keyboard-idcard.uvue

使用

ts

<x-keyboard-idcard></x-keyboard-idcard>

Props 属性

名称说明类型默认值
modelValue当前输入的值
string""
maxLen最大长度
number18
modelShow当前打开的状态。
等同v-model:model-show
booleanfalse
title顶部标题,默认:安全键盘请放心输入
string""
color主按钮色,空值取全局主题
string""
btnColor按钮背景,暗黑时会取二级inputDarkbg灰
string'white'
bgColor键盘背景
string'info'
fontColor文字颜色,暗黑是会取白。
string'#3b3b3b'
hold点击确认是否保持键盘不收起
booleanfalse

Events 事件

名称参数说明
changevalue: string值变化时触发
update:modelShow-变量控制打开状态
等同v-model:model-show
confirmvalue: stringpass: boolean确认时触发
cancelvalue: string关闭取消时触发
update:modelValue--

Slots 插槽

名称说明数据
default插槽,默认触发打开选择器。你的默认布局可以放置在这里。show: boolean

Ref 方法

名称参数返回值说明

示例文件路径

json

示例源码

uvue
最近更新