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

refactor(components): [carousel] class optimization in code #14954

Merged
merged 2 commits into from
Dec 26, 2023

Conversation

wzc520pyfm
Copy link
Contributor

@wzc520pyfm wzc520pyfm commented Nov 26, 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

🤖[deprecated] Generated by Copilot at 88bf522

Refactored the class binding logic of the carousel-item component to use a computed property. This made the code more readable and maintainable.

Related Issue

Fixes #___.

Explanation of Changes

🤖[deprecated] Generated by Copilot at 88bf522

  • Simplify :class binding of carousel-item component by using computed property itemKls (link)
  • Define itemKls computed property in setup function of carousel-item component (link)
  • Use ns utility to generate class names with el- prefix and is and em modifiers (link)
  • Use value property of ref objects to access reactive values of active, inStage, hover, and animating (link)
  • Depend on isCardType and isVertical props for itemKls computed property (link)

Copy link

👋 @wzc520pyfm, thank you for contributing element-plus.

  • 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.

Copy link

github-actions bot commented Nov 26, 2023

Copy link

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

Copy link

github-actions bot commented Nov 26, 2023

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

@wzc520pyfm wzc520pyfm changed the title refactor(components): [carousel] class optimization in code chore(components): [carousel] class optimization in code Dec 18, 2023
@ryuhangyeong ryuhangyeong merged commit 34effd4 into element-plus:dev Dec 26, 2023
8 checks passed
@ryuhangyeong ryuhangyeong changed the title chore(components): [carousel] class optimization in code refactor(components): [carousel] class optimization in code Dec 26, 2023
@element-bot element-bot mentioned this pull request Jan 10, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants