Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select: Add slot empty (#13769) #13785

Merged
merged 2 commits into from
Feb 19, 2019
Merged

Select: Add slot empty (#13769) #13785

merged 2 commits into from
Feb 19, 2019

Conversation

elfman
Copy link
Contributor

@elfman elfman commented Dec 16, 2018

close #13769

@element-bot
Copy link
Member

element-bot commented Dec 16, 2018

Deploy preview for element ready!

Built with commit 36ae811

https://deploy-preview-13785--element.netlify.com

@ziyoung ziyoung added this to the 2.6.0 milestone Feb 15, 2019
@ziyoung ziyoung merged commit f55fbdb into ElemeFE:dev Feb 19, 2019
@island205 island205 mentioned this pull request Mar 1, 2019
3 tasks
@robin-dongbin
Copy link

emptyText() {
        if (this.loading) {
          return this.loadingText || this.t('el.select.loading');
        } else {
          if (this.remote && this.query === '' && this.options.length === 0) return false;
          if (this.filterable && this.query && this.options.length > 0 && this.filteredOptionsCount === 0) {
            return this.noMatchText || this.t('el.select.noMatch');
          }
          if (this.options.length === 0) {
            return this.noDataText || this.t('el.select.noData');
          }
        }
        return null;
      },

提交时有审核这段代码么?很明显的错误

@elfman
Copy link
Contributor Author

elfman commented Mar 29, 2019

@winter-ice 这个pr并没有修改到emptyText的逻辑,只是让需要使用emptyText的时候改为使用slot。
你觉得emptyText的实现有啥问题?

@robin-dongbin
Copy link

见我提的issue #14888

weisiren168 pushed a commit to weisiren168/element that referenced this pull request Jun 20, 2019
* Select: Add slot `empty` (ElemeFE#13769)

* Select: add test case for slot `empty`
lzq4047 pushed a commit to lzq4047/element that referenced this pull request May 22, 2020
* Select: Add slot `empty` (ElemeFE#13769)

* Select: add test case for slot `empty`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Change the no-data-text of the select component to support HTML code
5 participants