# password-le

> password

Latest version **0.0.2** (published 2017-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install password-le
pnpm add password-le
yarn add password-le
bun add password-le
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2017-05-19 |
| First published | 2017-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | le-finance |
| Maintainers | le-finance |
| Keywords | password |

## Links

- npm: https://www.npmjs.com/package/password-le
- npm.io page: https://npm.io/package/password-le

## Dependencies (1)

- [keyboard-le](https://npm.io/package/keyboard-le.md) ^0.0.1

## Recent versions

- 0.0.2 (latest) — 2017-05-19
- 0.0.1 — 2017-05-18

## README

# 弹窗组件

## 目录
* [组件介绍](#组件介绍)
* [使用说明](#使用说明)
* [其他](#其他)

<a name="组件介绍"></a>
## 组件介绍

*password-le*<br/>

<a name="使用说明"></a>
## 使用说明
安装 password-le

```sh
npm i --save password-le
```
使用代码如下：
```js
var Password = require('password-le');
var password = new Password({
    doms: "#wrapper1",//装在步骤条的容器
    onComplete: function(val){
        //输入完成的回调函数
        console.log(val);
    },
    onChange : function(val){
        //输入发生变化时的回调函数
        console.log(val);
    },
    keyStyle: 2,//是否使用非系统键盘，1使用非系统键盘，2使用系统键盘
});

结合安全键盘
//输入支付密码，调用键盘
var Keyboard = require("../../keyboard/index");
var passowrdUtil = new Password({
    doms: "#wrapper2",//装在步骤条的容器
    keyStyle: 1,  //不使用键盘
    onChange: function(){},
    onComplete: function(value){
        //输入完成，校验
        //TODO
        var keyres = Keyboard.getOutput(value);
        console.log(keyres);
    }
});

Keyboard.init({
    inputValues: [1,2,3,4,5,6,7,8,9,'.',0,'del'], //按键内容 可选，默认为 [1,2,3,4,5,6,7,8,9,'',0,'del']
    onKeyUp: function(keycode){
        var current_val = passowrdUtil.getValue();
        if(keycode=="del"){
            current_val = current_val.slice(0, -1);
        }else{
            current_val += keycode;
        }
        passowrdUtil.setValue(current_val);
    }
})
```

---
_Source: https://npm.io/package/password-le · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
