小程序输入框组件,适用于支付密码、登录密码 等。
安装完成在开发者工具执行 npm build
npm install weapp-input-frame -S
*.json
"usingComponents": {
"input-frame": "miniprogram_npm/weapp-input-frame/index"
}
*.wxml
<input-frame />
divider
/ '' , 默认 ''<input-frame
value="123456"
plaintext
focus="{{ true }}"
bind:change="onChange"
bind:finished="onFinished"
/>
wxml
<input-frame id="input-frame />
js
// Demo
Page({
onLoad() {
const el = this.selectComponent('#input-frame');
el.getValue();
},
setVal() {
const el = this.selectComponent('#input-frame');
el.setValue(282828);
}
})