Merge pull request #2905 from EnesSacid-Buker/master

Money vue component update
This commit is contained in:
Cüneyt Şentürk 2023-02-24 15:43:35 +03:00 committed by GitHub
commit 7e75a374bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,6 +173,7 @@ export default {
mounted() { mounted() {
//this.model = this.value; //this.model = this.value;
if (this.isDynamic) {
if (this.dynamicCurrency.code != this.currency.code) { if (this.dynamicCurrency.code != this.currency.code) {
if (! this.dynamicCurrency.decimal) { if (! this.dynamicCurrency.decimal) {
this.money = { this.money = {
@ -182,6 +188,7 @@ export default {
this.money = this.dynamicCurrency; this.money = this.dynamicCurrency;
} }
} }
}
this.$emit('interface', this.model); this.$emit('interface', this.model);
}, },
@ -206,7 +213,7 @@ export default {
watch: { watch: {
dynamicCurrency: function (currency) { dynamicCurrency: function (currency) {
if (!currency) { if (! currency) {
return; return;
} }