Merge pull request #2818 from brkcvn/master

Modal refactoring
This commit is contained in:
Burak Civan
2022-12-13 17:51:02 +03:00
committed by GitHub
2 changed files with 6 additions and 5 deletions

View File

@ -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() {

View File

@ -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(',', '.') : '';