@ -199,6 +199,12 @@ export default {
|
|||||||
precision: 2,
|
precision: 2,
|
||||||
masked: false /* doesn't work with directive */
|
masked: false /* doesn't work with directive */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (this.$root.$options.methods) {
|
||||||
|
for (let method in this.$root.$options.methods) {
|
||||||
|
this[method] = this.$options.methods[method] !== undefined ? this.$options.methods[method] : this.$root.$options.methods[method];
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -814,11 +814,6 @@ const app = new Vue({
|
|||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
'form.discount': function (newVal, oldVal) {
|
'form.discount': function (newVal, oldVal) {
|
||||||
if (newVal > 99) {
|
|
||||||
newVal = oldVal;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (newVal != '' && newVal.search('^[-+]?([0-9]|[1-9][0-9]|100)*\.?[0-9]+$') !== 0) {
|
if (newVal != '' && newVal.search('^[-+]?([0-9]|[1-9][0-9]|100)*\.?[0-9]+$') !== 0) {
|
||||||
this.form.discount = oldVal;
|
this.form.discount = oldVal;
|
||||||
this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';
|
this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';
|
||||||
|
Reference in New Issue
Block a user