This commit is contained in:
2020-09-18 19:35:37 +00:00
parent 63c8e5ab68
commit ee58811d05
5 changed files with 21 additions and 9 deletions

View File

@@ -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
});

View File

@@ -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
});