mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-24 23:13:59 +00:00
51 lines
1.4 KiB
JavaScript
Vendored
51 lines
1.4 KiB
JavaScript
Vendored
import errorMessageHandler from "./errorMessageHandler";
|
|
import {VMoney} from 'v-money'
|
|
|
|
export default {
|
|
props: {
|
|
section:{
|
|
type: String,
|
|
required: true
|
|
},
|
|
data: {
|
|
type: Object,
|
|
default: null
|
|
}
|
|
},
|
|
created() {
|
|
if(this.data){
|
|
this.parameters = this.data;
|
|
this.parameters.gRecaptchaResponse = null
|
|
}
|
|
|
|
},
|
|
watch: {
|
|
'data': function() {
|
|
this.parameters = this.data;
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
isLoading: false,
|
|
error: '',
|
|
money: {decimal: '.',thousands: ',', precision: 2},
|
|
moneyV2: {decimal: '.',thousands: '', precision: 2},
|
|
productPrice: {decimal: '.',thousands: ',', precision: 3},
|
|
exchangeRate: {decimal: '.', thousands: '', precision: 5},
|
|
percentage: {decimal: '.', thousands: '', precision: 2, suffix: '%'},
|
|
threeDecimalPercentage: {decimal: '.', thousands: '', precision: 3, suffix: '%'},
|
|
integer: {decimal: '', thousands: '', precision: 0},
|
|
|
|
}
|
|
},
|
|
methods: {
|
|
formHandler(errorMessage){
|
|
this.isLoading = false;
|
|
this.updateList();
|
|
this.errorMessageHandler(errorMessage);
|
|
}
|
|
},
|
|
mixins: [errorMessageHandler],
|
|
directives: {money: VMoney}
|
|
|
|
} |