This commit is contained in:
@@ -23,7 +23,8 @@
|
||||
//https://dm4t2.github.io/vue-currency-input/guide/#introduction :value="formattedValue"
|
||||
//https://codesandbox.io/s/vue-template-kd7d1?fontsize=14&module=%2Fsrc%2FApp.vue
|
||||
//https://github.com/dm4t2/vue-currency-input
|
||||
import { setValue, getValue } from "vue-currency-input";
|
||||
//https://github.com/dm4t2/vue-currency-input/releases
|
||||
import { setValue, parseCurrency } from "vue-currency-input";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -50,7 +51,7 @@ export default {
|
||||
methods: {
|
||||
updateValue() {
|
||||
let val = this.$refs.textField.$refs.input.value;
|
||||
let parsedValue = getValue(val, {
|
||||
let parsedValue = parseCurrency(val, {
|
||||
currency: this.currencyName,
|
||||
locale: this.languageName
|
||||
});
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
//https://dm4t2.github.io/vue-currency-input/guide/#introduction
|
||||
//https://codesandbox.io/s/vue-template-kd7d1?fontsize=14&module=%2Fsrc%2FApp.vue
|
||||
//https://github.com/dm4t2/vue-currency-input
|
||||
//https://github.com/dm4t2/vue-currency-input/releases
|
||||
//NON CURRENCY MODE: https://dm4t2.github.io/vue-currency-input/config/#component
|
||||
import { setValue, getValue } from "vue-currency-input";
|
||||
import { setValue, parseCurrency } from "vue-currency-input";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -51,7 +52,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleInput(value) {
|
||||
let parsedValue = getValue(value, {
|
||||
let parsedValue = parseCurrency(value, {
|
||||
currency: null,
|
||||
locale: this.languageName
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user