Merge branch 'tests' of https://github.com/EnesSacid-Buker/akaunting into tests
This commit is contained in:
commit
c4d62df443
@ -304,7 +304,7 @@ export default {
|
|||||||
onInput(evt) {
|
onInput(evt) {
|
||||||
this.search = evt.target.value;
|
this.search = evt.target.value;
|
||||||
|
|
||||||
let option_url = this.selected_options.length > 0 ? this.selected_options[this.filter_index].url : '';
|
let option_url = this.selected_options.length > 0 && this.selected_options[this.filter_index] !== undefined ? this.selected_options[this.filter_index].url : '';
|
||||||
|
|
||||||
if (this.search) {
|
if (this.search) {
|
||||||
if (option_url.indexOf('?') === -1) {
|
if (option_url.indexOf('?') === -1) {
|
||||||
|
@ -362,7 +362,7 @@ export default {
|
|||||||
mounted() {
|
mounted() {
|
||||||
// Check Here..
|
// Check Here..
|
||||||
this.selected = this.value;
|
this.selected = this.value;
|
||||||
|
|
||||||
if (this.model.length) {
|
if (this.model.length) {
|
||||||
try {
|
try {
|
||||||
if (eval(this.model) !== undefined) {
|
if (eval(this.model) !== undefined) {
|
||||||
@ -939,29 +939,30 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
value: function (selected) {
|
value: function (selected) {
|
||||||
if (!this.multiple) {
|
// we tested this function works with post a form and after the selected function so put in the comment line
|
||||||
this.selected = selected.toString();
|
// if (!this.multiple) {
|
||||||
} else {
|
// this.selected = selected.toString();
|
||||||
if (Array.isArray(this.selected) && !this.selected.length) {
|
// } else {
|
||||||
this.selected = selected;
|
// if (Array.isArray(this.selected) && !this.selected.length) {
|
||||||
} else {
|
// this.selected = selected;
|
||||||
let is_string = false;
|
// } else {
|
||||||
let pre_value = [];
|
// let is_string = false;
|
||||||
|
// let pre_value = [];
|
||||||
|
|
||||||
selected.forEach(item => {
|
// selected.forEach(item => {
|
||||||
if (typeof item != 'string') {
|
// if (typeof item != 'string') {
|
||||||
is_string = true;
|
// is_string = true;
|
||||||
pre_value.push(item.toString());
|
// pre_value.push(item.toString());
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
if (is_string) {
|
// if (is_string) {
|
||||||
this.selected = pre_value;
|
// this.selected = pre_value;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.change();
|
// this.change();
|
||||||
},
|
},
|
||||||
|
|
||||||
model: function (selected) {
|
model: function (selected) {
|
||||||
|
@ -1147,29 +1147,30 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
value: function (selected) {
|
value: function (selected) {
|
||||||
if (!this.multiple) {
|
// we tested this function works with post a form and after the selected function so put in the comment line
|
||||||
this.selected = selected.toString();
|
// if (!this.multiple) {
|
||||||
} else {
|
// this.selected = selected.toString();
|
||||||
if (Array.isArray(this.selected) && !this.selected.length) {
|
// } else {
|
||||||
this.selected = selected;
|
// if (Array.isArray(this.selected) && !this.selected.length) {
|
||||||
} else {
|
// this.selected = selected;
|
||||||
let is_string = false;
|
// } else {
|
||||||
let pre_value = [];
|
// let is_string = false;
|
||||||
|
// let pre_value = [];
|
||||||
|
|
||||||
selected.forEach(item => {
|
// selected.forEach(item => {
|
||||||
if (typeof item != 'string') {
|
// if (typeof item != 'string') {
|
||||||
is_string = true;
|
// is_string = true;
|
||||||
pre_value.push(item.toString());
|
// pre_value.push(item.toString());
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
if (is_string) {
|
// if (is_string) {
|
||||||
this.selected = pre_value;
|
// this.selected = pre_value;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
this.change();
|
// this.change();
|
||||||
},
|
},
|
||||||
|
|
||||||
model: function (selected) {
|
model: function (selected) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user