|
@@ -124,14 +124,14 @@
|
|
|
|
|
|
emptyText() {
|
|
emptyText() {
|
|
if (this.loading) {
|
|
if (this.loading) {
|
|
- return this.t('el.select.loading');
|
|
|
|
|
|
+ return this.loadingText || this.t('el.select.loading');
|
|
} else {
|
|
} else {
|
|
if (this.remote && this.query === '' && this.options.length === 0) return false;
|
|
if (this.remote && this.query === '' && this.options.length === 0) return false;
|
|
if (this.filterable && this.options.length > 0 && this.filteredOptionsCount === 0) {
|
|
if (this.filterable && this.options.length > 0 && this.filteredOptionsCount === 0) {
|
|
- return this.t('el.select.noMatch');
|
|
|
|
|
|
+ return this.noMatchText || this.t('el.select.noMatch');
|
|
}
|
|
}
|
|
if (this.options.length === 0) {
|
|
if (this.options.length === 0) {
|
|
- return this.t('el.select.noData');
|
|
|
|
|
|
+ return this.noDataText || this.t('el.select.noData');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return null;
|
|
return null;
|
|
@@ -163,6 +163,9 @@
|
|
allowCreate: Boolean,
|
|
allowCreate: Boolean,
|
|
loading: Boolean,
|
|
loading: Boolean,
|
|
remote: Boolean,
|
|
remote: Boolean,
|
|
|
|
+ loadingText: String,
|
|
|
|
+ noMatchText: String,
|
|
|
|
+ noDataText: String,
|
|
remoteMethod: Function,
|
|
remoteMethod: Function,
|
|
filterMethod: Function,
|
|
filterMethod: Function,
|
|
multiple: Boolean,
|
|
multiple: Boolean,
|
|
@@ -291,6 +294,7 @@
|
|
this.setOverflow();
|
|
this.setOverflow();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.$emit('visible-change', val);
|
|
},
|
|
},
|
|
|
|
|
|
options(val) {
|
|
options(val) {
|
|
@@ -433,7 +437,9 @@
|
|
let inputChildNodes = this.$refs.reference.$el.childNodes;
|
|
let inputChildNodes = this.$refs.reference.$el.childNodes;
|
|
let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
|
|
let input = [].filter.call(inputChildNodes, item => item.tagName === 'INPUT')[0];
|
|
input.style.height = Math.max(this.$refs.tags.clientHeight + 6, sizeMap[this.size] || 36) + 'px';
|
|
input.style.height = Math.max(this.$refs.tags.clientHeight + 6, sizeMap[this.size] || 36) + 'px';
|
|
- this.broadcast('ElSelectDropdown', 'updatePopper');
|
|
|
|
|
|
+ if (this.visible && this.emptyText !== false) {
|
|
|
|
+ this.broadcast('ElSelectDropdown', 'updatePopper');
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|