refs select and select remote re-factoring
This commit is contained in:
@ -269,7 +269,7 @@ export default {
|
|||||||
|
|
||||||
created() {
|
created() {
|
||||||
// Option set sort_option data
|
// Option set sort_option data
|
||||||
if (Object.keys(this.options).length) {
|
if (!Array.isArray(this.options)) {
|
||||||
for (const [key, value] of Object.entries(this.options)) {
|
for (const [key, value] of Object.entries(this.options)) {
|
||||||
this.sort_options.push({
|
this.sort_options.push({
|
||||||
key: key,
|
key: key,
|
||||||
@ -279,8 +279,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.options.forEach(function (option, index) {
|
this.options.forEach(function (option, index) {
|
||||||
this.sort_options.push({
|
this.sort_options.push({
|
||||||
key: option,
|
index: index,
|
||||||
value: index
|
key: option.id,
|
||||||
|
value: (option.title) ? option.title : (option.display_name) ? option.display_name : option.name
|
||||||
});
|
});
|
||||||
}, this);
|
}, this);
|
||||||
}
|
}
|
||||||
@ -366,11 +367,11 @@ export default {
|
|||||||
var value = this.$children[0].$children[0].$refs.input.value;
|
var value = this.$children[0].$children[0].$refs.input.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.add_new.type == 'inline') {
|
if (value === '') {
|
||||||
if (value === '') {
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
if (this.add_new.type == 'inline') {
|
||||||
await this.addInline(value);
|
await this.addInline(value);
|
||||||
} else {
|
} else {
|
||||||
await this.onModal(value);
|
await this.onModal(value);
|
||||||
@ -535,6 +536,10 @@ export default {
|
|||||||
padding: 10px 0 0 !important;
|
padding: 10px 0 0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-select-dropdown__empty.loading {
|
||||||
|
padding: 10px 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.el-select__footer {
|
.el-select__footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border-top: 1px solid #dee2e6;
|
border-top: 1px solid #dee2e6;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user