File tree 3 files changed +8
-3
lines changed
3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
npm-debug.log
2
2
node_modules
3
+ .DS_Store
3
4
/.vscode
4
5
/.idea
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " vue-numeric" ,
3
- "version" : " 1.3.1 " ,
3
+ "version" : " 1.3.2 " ,
4
4
"description" : " Input field component to display currency value based on Vue." ,
5
5
"author" : " Kevin Ongko" ,
6
6
"main" : " src/vue-numeric.vue" ,
Original file line number Diff line number Diff line change 1
1
<template >
2
- <input type =" tel" :value =" value" v-model =" amount" ref =" numeric" :placeholder =" placeholder" @blur =" processValue(amountValue)" >
2
+ <input type =" tel" :value =" value" v-model =" amount" ref =" numeric" :placeholder =" placeholder" @blur =" processValue(amountValue)" @focus = " formatValueToNumberType " >
3
3
</template >
4
4
5
5
<script >
@@ -221,6 +221,10 @@ export default {
221
221
})
222
222
223
223
this .$emit (' input' , Number (accounting .toFixed (value, this .precision )))
224
+ },
225
+
226
+ formatValueToNumberType () {
227
+ this .amount = this .value
224
228
}
225
229
},
226
230
@@ -234,4 +238,4 @@ export default {
234
238
if (this .defaultValue ) this .processValue (this .defaultValue )
235
239
}
236
240
}
237
- </script >
241
+ </script >
You can’t perform that action at this time.
0 commit comments