8000 GitHub - yongbo000/ractive-moneyInput: 一个基于ractive的金额输入组件。
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

yongbo000/ractive-moneyInput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ractive-moneyinput

see demo

输入框过滤规则:

  • 最多两位小数
  • 如输入大于设置的最大值,仅展示最大值
  • 只能包含 [0-9.]
  • 数值超过2位的情况下,不可以0开头

安装

npm install ractive-moneyinput --save

使用

const MoneyInput = require('ractive-moneyinput');

Ractive({
  target: '#J_target',
  template: `
    <MoneyInput on-input="@this.fire('input')" max="100000" name="money" value="{{moneyValue}}" placeholder="最低充值金额50美元起" autocomplete="off" autofocus tabindex="0" />
  `,
  components: {
    MoneyInput,
  },
  data: {
    moneyValue: '',
  },
  on: {
    input() {
      console.log(this.get('moneyValue'))
    }
  }
});

About

一个基于ractive的金额输入组件。

Resources

Stars

Watchers

Forks

< 3461 div class="BorderGrid-row">

Releases

No releases published

Packages

No packages published
0