Money vue component updated
This commit is contained in:
parent
22722daab5
commit
2069a9161c
@ -109,6 +109,11 @@ export default {
|
|||||||
default: false,
|
default: false,
|
||||||
description: "Selectbox disabled status"
|
description: "Selectbox disabled status"
|
||||||
},
|
},
|
||||||
|
isDynamic: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true,
|
||||||
|
description: "Currency is dynamic"
|
||||||
|
},
|
||||||
dynamicCurrency: {
|
dynamicCurrency: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: function () {
|
default: function () {
|
||||||
@ -168,18 +173,20 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
//this.model = this.value;
|
//this.model = this.value;
|
||||||
|
|
||||||
if (this.dynamicCurrency.code != this.currency.code) {
|
if (this.isDynamic) {
|
||||||
if (! this.dynamicCurrency.decimal) {
|
if (this.dynamicCurrency.code != this.currency.code) {
|
||||||
this.money = {
|
if (! this.dynamicCurrency.decimal) {
|
||||||
decimal: this.dynamicCurrency.decimal_mark,
|
this.money = {
|
||||||
thousands: this.dynamicCurrency.thousands_separator,
|
decimal: this.dynamicCurrency.decimal_mark,
|
||||||
prefix: (this.dynamicCurrency.symbol_first) ? this.dynamicCurrency.symbol : '',
|
thousands: this.dynamicCurrency.thousands_separator,
|
||||||
suffix: (! this.dynamicCurrency.symbol_first) ? this.dynamicCurrency.symbol : '',
|
prefix: (this.dynamicCurrency.symbol_first) ? this.dynamicCurrency.symbol : '',
|
||||||
precision: parseInt(this.dynamicCurrency.precision),
|
suffix: (! this.dynamicCurrency.symbol_first) ? this.dynamicCurrency.symbol : '',
|
||||||
masked: this.masked
|
precision: parseInt(this.dynamicCurrency.precision),
|
||||||
};
|
masked: this.masked
|
||||||
} else {
|
};
|
||||||
this.money = this.dynamicCurrency;
|
} else {
|
||||||
|
this.money = this.dynamicCurrency;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +213,7 @@ export default {
|
|||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
dynamicCurrency: function (currency) {
|
dynamicCurrency: function (currency) {
|
||||||
if (!currency) {
|
if (! currency) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user