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): [image] update class by computed and new docs #13024

Merged
merged 3 commits into from
Jun 3, 2023

Conversation

wzc520pyfm
Copy link
Contributor

@wzc520pyfm wzc520pyfm commented May 31, 2023

Related: #10754

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

🤖 Generated by Copilot at 101518a

This pull request enhances the image and image viewer components by improving their documentation, refactoring their code, and fixing some inconsistencies. It updates the ./docs/en-US/component/image.md file to match the actual code and usage of the components. It also adds comments, simplifies types, and refactors class bindings in the ./packages/components/image-viewer/src/image-viewer.vue, ./packages/components/image/src/image.ts, ./packages/components/image/src/image.vue, and ./packages/components/image-viewer/src/image-viewer.ts files.

Related Issue

Fixes #___.

Explanation of Changes

🤖 Generated by Copilot at 101518a

  • Update and add description comments for image and image viewer props (link, link, link)
  • Add zoomRate prop and remove infinite prop for image component (link)
  • Add close-on-press-escape prop for image viewer component (link)
  • Refactor class bindings for image and image viewer components to use computed properties (link, link, link, link)
  • Use defineExpose to register setActiveItem expose for image viewer component (link)
  • Update documentation of image and image viewer attributes in docs/en-US/component/image.md to match code and add default values and type annotations (link, link)
  • Remove version tag for loading attribute in docs/en-US/component/image.md (link)
  • Rename Image Viewer Methods section to Image Viewer Exposes in docs/en-US/component/image.md (link)

@pull-request-triage
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.

@github-actions
Copy link

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

@github-actions
Copy link

github-actions bot commented May 31, 2023

@github-actions github-actions bot added the CommitMessage::Qualified Qualified commit message label May 31, 2023
@github-actions
Copy link

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

@tolking tolking merged commit abd6fae into element-plus:dev Jun 3, 2023
13 checks passed
consultation-applio pushed a commit to consultation-applio/element-plus that referenced this pull request Nov 10, 2023
…ent-plus#13024)

* docs(components): [image and image viewer] use new display tag

* refactor(components): [image | image-viewer] set class by computed

* docs(components): [image] update head of image viewer exposes
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

4 participants