File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 11npm-debug.log
22node_modules
3+ .DS_Store
34/.vscode
45/.idea
Original file line number Diff line number Diff line change 11{
22 "name" : " vue-numeric" ,
3- "version" : " 1.3.1 " ,
3+ "version" : " 1.3.2 " ,
44 "description" : " Input field component to display currency value based on Vue." ,
55 "author" : " Kevin Ongko" ,
66 "main" : " src/vue-numeric.vue" ,
Original file line number Diff line number Diff line change 11<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 " >
33</template >
44
55<script >
@@ -221,6 +221,10 @@ export default {
221221 })
222222
223223 this .$emit (' input' , Number (accounting .toFixed (value, this .precision )))
224+ },
225+
226+ formatValueToNumberType () {
227+ this .amount = this .value
224228 }
225229 },
226230
@@ -234,4 +238,4 @@ export default {
234238 if (this .defaultValue ) this .processValue (this .defaultValue )
235239 }
236240}
237- </script >
241+ </script >
You can’t perform that action at this time.
0 commit comments