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

feat(components): [cascader] add max-collpase-tags prop #13386

Merged
merged 16 commits into from
Aug 24, 2023

Conversation

chenweiyi
Copy link
Contributor

@chenweiyi chenweiyi commented Jun 28, 2023

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

Show more than one tag when multiple and collapse-tags prop use.

🤖 Generated by Copilot at c58d594

Added a new max-collapse-tags attribute to the cascader component, allowing users to limit the number of tags displayed in multiple selection mode. Updated the documentation, the component code and the example to reflect this feature.

Related Issue

Explanation of Changes

  • add max-collapse-tags prop
  • when set max-collapse-tags, presentTags will change to max-collapse-tags's value. collapse-tag number will change to total tags subtract max-collapse-tags。
  • update en-US doc

🤖 Generated by Copilot at c58d594

  • Add maxCollapseTags prop to cascader component to control the number of tags displayed when collapse-tags is true (link, link, link)
  • Update documentation for cascader component to include the new prop and its usage (link, link)
  • Add example for cascader component with maxCollapseTags set to 3 in docs/examples/cascader/multiple-selection.vue (link)

chenweiyi01 and others added 2 commits June 28, 2023 11:35
show more than one tag in cascade when multiple enable and use collapse-tags true
@pull-request-triage
Copy link

👋 @chenweiyi, seems like this is your first time contribution to element-plus.

  • Please make sure that you have read our guidelines and code of conduct before making a contribution.
  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@pull-request-triage pull-request-triage bot added 1st contribution Their very first contribution Needs Review labels Jun 28, 2023
@github-actions
Copy link

github-actions bot commented Jun 28, 2023

@github-actions
Copy link

Hello @chenweiyi, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@chenweiyi chenweiyi changed the title Add max-collpase-tags prop for Cascade component feat(components): [cascader] Add max-collpase-tags prop for Cascade component Jun 28, 2023
@chenweiyi chenweiyi changed the title feat(components): [cascader] Add max-collpase-tags prop for Cascade component feat(components): [cascader] Add max-collpase-tags prop Jun 28, 2023
@chenweiyi chenweiyi changed the title feat(components): [cascader] Add max-collpase-tags prop feat(components): [cascader] add max-collpase-tags prop Jun 28, 2023
@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label Jun 28, 2023
@github-actions
Copy link

github-actions bot commented Jun 28, 2023

🧪 Playground Preview: https://element-plus.run/?pr=13386
Please comment the example via this playground if needed.

@chenweiyi chenweiyi requested a review from btea July 20, 2023 10:46
Copy link
Collaborator

@btea btea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chenweiyi
Copy link
Contributor Author

LGTM

happy, thank you!

@chenweiyi chenweiyi requested a review from btea July 21, 2023 00:56
@btea btea requested a review from ryuhangyeong July 21, 2023 08:36
@btea btea requested a review from tolking August 8, 2023 02:50
@tolking tolking merged commit 013809f into element-plus:dev Aug 24, 2023
11 of 12 checks passed
@tolking
Copy link
Member

tolking commented Aug 24, 2023

Thank for your contribution

@btea btea mentioned this pull request Aug 24, 2023
3 tasks
@element-bot element-bot mentioned this pull request Aug 25, 2023
3 tasks
laizuan pushed a commit to laizuan/element-plus that referenced this pull request Sep 5, 2023
…#13386)

* feat(components): add max-collapse-tags prop

show more than one tag in cascade when multiple enable and use collapse-tags true

* test(test-utils): add unit test for cascader prop 'max-collapse-tags'

* Update packages/components/cascader/src/cascader.vue

Co-authored-by: btea <2356281422@qq.com>

* Update cascader.vue

* refactor(components): [cascader] style lint

---------

Co-authored-by: chenweiyi01 <chenweiyi01@zuoyebang.com>
Co-authored-by: btea <2356281422@qq.com>
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
…#13386)

* feat(components): add max-collapse-tags prop

show more than one tag in cascade when multiple enable and use collapse-tags true

* test(test-utils): add unit test for cascader prop 'max-collapse-tags'

* Update packages/components/cascader/src/cascader.vue

Co-authored-by: btea <2356281422@qq.com>

* Update cascader.vue

* refactor(components): [cascader] style lint

---------

Co-authored-by: chenweiyi01 <chenweiyi01@zuoyebang.com>
Co-authored-by: btea <2356281422@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants