1.0.1 • Published 2 years ago

vue-number-input-formatted v1.0.1

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

vue-number-input-formatted

A component to build a simple input with a format and without any wrappers.

Install

NPM:

npm install --save vue-number-input-formatted

Usage instructions

import VueNumberInputFormatted from 'vue-number-input-formatted';

export default {
  ...
  components: {
    VueNumberInputFormatted
  }
  ...
}

Props

NameTypeDescriptionRequiredDefault
valueNumber, StringProps to set the value of the input. Ready to use with v-model directiveTrue''
positionsNumberNumber of decimal positionsFalse2
prefixStringString to set the symbol as input prefixFalse'$'
suffixStringString to set the symbol as input suffixFalse''
separatorStringString to set the thousands separatorFalse','
idStringProps to set the input idFalsenull
disabledBooleanProps to disabled/enabled the inputFalsefalse
readonlyBooleanProps to set the input as readonlyFalsefalse
formStringName of the form to which the input belongsFalsenull
maxlengthNumberMax number of characters for the inputFalsenull
minlengthNumberMin number of characters for the inputFalsenull
nameNumberString to set the input nameFalsenull
patternRegExpRegular expression to validate the input valueFalsenull
placeholderStringString to set the input placeholderFalsenull
padStartStringNumber to set a specific length for the inputFalse0
padStartStringStringString to fill the missing characters for a specified padStart propFalse''
allowEmptyBooleanValue to indicate when the input could have an empty stringFalsefalse

Events

Name
blur
change
focus
keydown
keypress
keyup
click

Methods

Name
focus

License

MIT