By default the decimal value is disabled. To use decimals in the value, add the precision prop.
precision accept a String or Number numeric value.
<vue-numeric v-bind:precision="2"></vue-numeric>
Thousands separator
Default thousand separator's symbol is ,.
Use the separator prop to change the thousands separator.
separator only accepts space, , or ..
When using the . or space as thousand separator, the decimal separator will be ,.
<vue-numeric separator="."></vue-numeric>
Input placeholder when empty
<vue-numeric placeholder="only number allowed"></vue-numeric>
Value when empty
By default, when you clean the input the value is set to 0. You can change this value to fit your needs.
<vue-numeric :empty-value="1"></vue-numeric>
Output Type
By default the value emitted for the input event is of type Number. However you may choose to get a String instead
by setting the property output-type to String.
<vue-numeric output-type="String"></vue-numeric>
Props
Props
Description
Required
Type
Default
currency
Currency prefix
false
String
-
currency-symbol-position
Position of the symbol (accepted values: prefix or suffix)
false
String
prefix
currency-symbol-spacing
Ability to remove space between currency symbol and amount