File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-numeric-input" ,
3
- "version" : " 1.0.4 " ,
3
+ "version" : " 1.0.5 " ,
4
4
"description" : " Vue Numeric Input Component" ,
5
5
"author" : " JayeshLab <helloiamjayesh@gmail.com>" ,
6
6
"license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -169,13 +169,13 @@ export default {
169
169
* Handle value on Input
170
170
*/
171
171
inputHandler (val ) {
172
- this .updateValue (this .toNumber (val))
172
+ this .updateValue (this .toNumber (val), val )
173
173
},
174
174
/**
175
175
* Update value on operation performed
176
176
* @param val
177
177
*/
178
- updateValue : function (val ) {
178
+ updateValue : function (val , strVal = null ) {
179
179
const oldVal = this .numericValue
180
180
val = this .toPrecision (val, this .precision )
181
181
if (val >= this .max ) {
@@ -185,7 +185,7 @@ export default {
185
185
val = this .min
186
186
}
187
187
if (val === oldVal) {
188
- this .$refs .input .value = val
188
+ this .$refs .input .value = strVal && val === this . toNumber (strVal) ? strVal : val
189
189
return
190
190
}
191
191
this .numericValue = val
You can’t perform that action at this time.
0 commit comments