1.0.5 • Published 2 years ago

vuenos-input-money v1.0.5

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

vuenos-input-money

description

Prerequisites

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

Table of contents

Getting Started

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.

Installation

To install and set up the library, run:

npm install vuenos-input-money

Usage

Import component

<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";

Get value input

const getMoneyVal = (val) => {
    console.log(val);
}

Set value input

const InputMoneyRef = ref<null | { setInput: (val) => null }>(null)
const setInputMoneyVal = (val) => {
    InputMoneyRef.value?.setInput(val)
}
return {
    InputMoneyRef
}

Trigger blur action

const blurInput = async () => {
    //do something
}

Variables binding

ATTRIBUTEDESCRIPTIONREQUIREDTYPEACCEPTED VALUESDEFAULT
placeholderplaceholder of inputString'Số tiền'empty
suffixsuffix of inputString'VNĐ'empty
maxLengthmaxlength of inputNumber14empty
showTextshow convert number to textBooleantrue/falsefalse
disableddisable inputBooleantrue/falsefalse
errorerror style inputBooleantrue/falseempty

Versioning

v1.0.3

Author

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago