# sk-comp-keyboard

> sk-comp-keyboard

Latest version **0.0.2** (published 2017-07-03) · 0 weekly downloads

## Install

```sh
npm install sk-comp-keyboard
pnpm add sk-comp-keyboard
yarn add sk-comp-keyboard
bun add sk-comp-keyboard
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2017-07-03 |
| First published | 2017-07-03 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | 疯巅 |
| Maintainers | yaozhong.hyz |

## Links

- npm: https://www.npmjs.com/package/sk-comp-keyboard
- Repository: git@gitlab.alibaba-inc.com:sk-components/sk-comp-keyboard
- npm.io page: https://npm.io/package/sk-comp-keyboard

## Recent versions

- 0.0.2 (latest) — 2017-07-03

## README

全渠道虚拟键盘组件,可用于验证码输入,金额输入等

# sk-comp-keyboard

- category: UI
- chinese: 图标
- type: UI组件

---

## API

参数 | 说明 | 类型 | 默认值
-----|-----|-----|-----
onBtnPress | 输出当前虚拟键盘输出的值,返回值为int类型 | Function| 无
onInput | 当前虚拟键盘中总计输出值,返回值为object类型,showNum为string类型百分位的值,可用于金额技术,num为string类型数值 | Function| 无


--

## 注意
小数点后**最多输出两位**,否则建议直接使用onBtnPress来进行自行封装输出数据.


--

## 使用demo


````

/** @jsx createElement */
import {createElement, Component,render } from 'rax';
import {View,Text} from 'nuke';
import NukeBizTest from 'sk-comp-keyboard';

let App = class NukeDemoIndex extends Component {
    constructor() {
        super();

        this.state = {
            value: '',
            priceValue: '',
        }
    }
    onInput(obj){
    console.log(obj);
        this.setState({
            value: obj.num,
            priceValue: obj.showNum
        })
    }
    render() {
        return (
            <View>
                <View>
                    <Text>验证码:{this.state.value}</Text>
                    <Text>金额:{this.state.priceValue}</Text>
                </View>
                <View style={styles.keyboardStyle}>
                    <NukeBizTest onInput={(obj) => this.onInput(obj)} wrapperStyle={styles.keyboardStyle} />
                </View>
            </View>
        );
    }
}
const styles={
    btnWithMargin:{
        marginTop:'30rem',
        marginBottom:'50rem',
        marginLeft:'42rem',
        marginRight:'42rem'
    },
    btnLine:{
        marginTop:'30rem',
        marginBottom:'50rem',
        paddingLeft:'42rem',
        paddingRight:'42rem' //#1170bc;
    },
    keyboardStyle: {
        width: '750rem'
    }
}
render(<App/>);


````

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