Commit 29264399e4b28cdce70bfc290d90f1a535488059
1 parent
b9a4026f
update Select
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
src/components/select/select.vue
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | </div> | 26 | </div> |
27 | <transition :name="transitionName"> | 27 | <transition :name="transitionName"> |
28 | <Drop v-show="dropVisible" :placement="placement" ref="dropdown"> | 28 | <Drop v-show="dropVisible" :placement="placement" ref="dropdown"> |
29 | - <ul v-show="(notFound && !remote) || (remote && !loading && !options.length)" :class="[prefixCls + '-not-found']"><li>{{ localeNotFoundText }}</li></ul> | 29 | + <ul v-show="notFountShow" :class="[prefixCls + '-not-found']"><li>{{ localeNotFoundText }}</li></ul> |
30 | <ul v-show="(!notFound && !remote) || (remote && !loading && !notFound)" :class="[prefixCls + '-dropdown-list']"><slot></slot></ul> | 30 | <ul v-show="(!notFound && !remote) || (remote && !loading && !notFound)" :class="[prefixCls + '-dropdown-list']"><slot></slot></ul> |
31 | <ul v-show="loading" :class="[prefixCls + '-loading']">{{ localeLoadingText }}</ul> | 31 | <ul v-show="loading" :class="[prefixCls + '-loading']">{{ localeLoadingText }}</ul> |
32 | </Drop> | 32 | </Drop> |
@@ -199,6 +199,10 @@ | @@ -199,6 +199,10 @@ | ||
199 | const options = this.$slots.default || []; | 199 | const options = this.$slots.default || []; |
200 | if (!this.loading && this.remote && this.query === '' && !options.length) status = false; | 200 | if (!this.loading && this.remote && this.query === '' && !options.length) status = false; |
201 | return this.visible && status; | 201 | return this.visible && status; |
202 | + }, | ||
203 | + notFountShow () { | ||
204 | + const options = this.$slots.default || []; | ||
205 | + return (this.notFound && !this.remote) || (this.remote && !this.loading && !options.length); | ||
202 | } | 206 | } |
203 | }, | 207 | }, |
204 | methods: { | 208 | methods: { |