Skip to content
input-frame for weapp
JavaScript
Branch: master
Clone or download
Latest commit 404aabd Feb 3, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src release 1.1.0 Feb 3, 2020
test v1.0.0 Feb 1, 2020
tools v1.0.1 Feb 1, 2020
.babelrc v1.0.0 Feb 1, 2020
.eslintrc.js v1.0.0 Feb 1, 2020
.gitignore v1.0.0 Feb 1, 2020
.npmignore v1.0.0 Feb 1, 2020
LICENSE v1.0.0 Feb 1, 2020
README.md Update doc Feb 3, 2020
gulpfile.js v1.0.0 Feb 1, 2020
package.json release 1.1.0 Feb 3, 2020

README.md

input-frame GitHub package.json version GitHub

Screenshots

Install

npm install weapp-input-frame

Usage

*.json

"usingComponents": {
  "input-frame": "miniprogram_npm/weapp-input-frame/index"
}

*.wxml

<input-frame />

API

  • value 输入框默认值
  • plaintext 是否明文显示, 默认 false
  • focus 是否获取焦点, 默认 false
  • bind:change 输入发生变化触发
  • bind:finished 输入完成时触发
  • space 输入框的格子数量,一般 4 - 6, 默认 6
  • frameStyle 输入框的风格, divider / '' , 默认 ''
  • custom-class 自定义组件class
<input-frame
  value="123456"

  plaintext

  focus="{{ true }}"

  bind:change="onChange"

  bind:finished="onFinished"
/>

Methods

  • getValue 获取输入框值

wxml

<input-frame id="input-frame />

js

Page({
  onLoad() {
    const el = this.selectComponent('#input-frame');
    el.getValue();
  }
})

License

MIT

You can’t perform that action at this time.