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(comp:image): add image and imageViewer components #706

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

typistZxd
Copy link
Member

fix #698

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Component style update
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

What is the new behavior?

add image and imageViewer components

Other information

@idux-bot
Copy link

idux-bot bot commented Jan 6, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jan 6, 2022

Codecov Report

Merging #706 (cef7716) into main (67b7d05) will increase coverage by 0.13%.
The diff coverage is 93.61%.

❗ Current head cef7716 differs from pull request most recent head bc67af2. Consider uploading reports for the commit bc67af2 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #706      +/-   ##
==========================================
+ Coverage   85.30%   85.43%   +0.13%     
==========================================
  Files         396      397       +1     
  Lines        9947    10078     +131     
  Branches     2302     2340      +38     
==========================================
+ Hits         8485     8610     +125     
- Misses       1462     1468       +6     
Impacted Files Coverage Δ
...ponents/image/src/component/ImageViewerContent.tsx 89.65% <89.65%> (ø)
packages/components/config/src/defaultConfig.ts 100.00% <100.00%> (ø)
packages/components/image/src/Image.tsx 100.00% <100.00%> (ø)
packages/components/image/src/ImageViewer.tsx 100.00% <100.00%> (ø)
packages/components/image/src/types.ts 100.00% <100.00%> (ø)
packages/components/menu/src/Menu.tsx 100.00% <0.00%> (ø)
packages/components/menu/src/token.ts 100.00% <0.00%> (ø)
packages/components/menu/src/types.ts 100.00% <0.00%> (ø)
packages/components/dropdown/src/token.ts 100.00% <0.00%> (ø)
packages/components/dropdown/src/Dropdown.tsx 9.09% <0.00%> (ø)
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 67b7d05...bc67af2. Read the comment docs.

@typistZxd typistZxd force-pushed the feat-image-zxd branch 3 times, most recently from 188c5b9 to 4f09b0c Compare January 10, 2022 09:40
@typistZxd typistZxd changed the title WIP:feat(comp:image): add image and imageViewer components feat(comp:image): add image and imageViewer components Jan 10, 2022
@typistZxd typistZxd force-pushed the feat-image-zxd branch 2 times, most recently from 98a4b20 to 89f7147 Compare January 11, 2022 08:32
Copy link
Member

@danranVm danranVm left a comment

Choose a reason for hiding this comment

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

有几个问题,后续 PR 修改吧。

inheritAttrs: false,
props: imageProps,
setup(props, { attrs, slots }) {
const { class: className, style, ...rest } = attrs
Copy link
Member

Choose a reason for hiding this comment

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

attrs 要在 computed 或者 render 内部解构,setup 是一次性调用的。

setup(props) {
const common = useGlobalConfig('common')
const config = useGlobalConfig('imageViewer')
const [visible] = useControlledProp(props, 'visible', false)
Copy link
Member

Choose a reason for hiding this comment

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

set 呢?

@danranVm danranVm merged commit 8b5212b into IDuxFE:main Jan 13, 2022
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.

[comp:image] Optimize and reconstruct image components
2 participants