description
This project using NodeJS (version 16.10.0 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v
7.24.0
v16.10.0
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
To install and set up the library, run:
npm install vuenos-input-money
<VuenosInputMoney ref="InputMoneyRef"
@getValue="getMoneyVal"
@blur="blurInput"
:placeholder="'Số tiền'"
:suffix="'VNĐ'"
:maxLength="14"
:disabled="true"
:error="true"
:showText="true">
</VuenosInputMoney>
import VuenosInputMoney from "vuenos-input-money";
const getMoneyVal = (val) => {
console.log(val);
}
const InputMoneyRef = ref<null | { setInput: (val) => null }>(null)
const setInputMoneyVal = (val) => {
InputMoneyRef.value?.setInput(val)
}
return {
InputMoneyRef
}
const blurInput = async () => {
//do something
}
ATTRIBUTE | DESCRIPTION | REQUIRED | TYPE | ACCEPTED VALUES | DEFAULT |
---|---|---|---|---|---|
placeholder | placeholder of input | String | 'Số tiền' | empty | |
suffix | suffix of input | String | 'VNĐ' | empty | |
maxLength | maxlength of input | Number | 14 | empty | |
showText | show convert number to text | Boolean | true/false | false | |
disabled | disable input | Boolean | true/false | false | |
error | error style input | Boolean | true/false | empty |
v1.0.5
- Sơn Nguyễn - Initial work - Sơn Nguyễn