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

[comp:image ]feature image component #30

Closed
1 task done
lwh2015 opened this issue Dec 18, 2020 · 5 comments · Fixed by #66
Closed
1 task done

[comp:image ]feature image component #30

lwh2015 opened this issue Dec 18, 2020 · 5 comments · Fixed by #66
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@lwh2015
Copy link
Contributor

lwh2015 commented Dec 18, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

  • 需要展示图片时使用。
  • 单击图像可以放大显示 。
  • 加载失败显示图像占位符。

What does the proposed API look like?

属性 说明 类型 全局配置 版本号
alt 图像描述 string - -
fallback 加载失败容错地址 string - -
height 图像高度 string | number - -
preview 预览参数,为false 时禁用 boolean - -
src 图片地址 string - -
width 图像宽度 string | number - -
fit 确定图片如何适应容器框,同原生 object-fit string - -
@lwh2015 lwh2015 added the enhancement New feature or request label Dec 18, 2020
@danranVm danranVm mentioned this issue Dec 18, 2020
95 tasks
@danranVm
Copy link
Member

@zymoplastic @danranVm 负责此组件的 review, API 设计完成后请 @ 他们

@coolyuantao
Copy link
Member

建议添加下面的支持:

  1. 类似background-size的功能,实际图片的大小不一定跟定义的一致,这时要加适应方案
  2. src是否支持blob(比如:URL.createObjectURL(blob)),或者base64的格式?

@lwh2015
Copy link
Contributor Author

lwh2015 commented Dec 20, 2020

建议添加下面的支持:

  1. 类似background-size的功能,实际图片的大小不一定跟定义的一致,这时要加适应方案
  2. src是否支持blob(比如:URL.createObjectURL(blob)),或者base64的格式?

1.会增加一个fit配置,适应容器框,同原生的object-fit
2.src支持base64的格式以及blob

@zymoplastic
Copy link
Contributor

zymoplastic commented Dec 21, 2020

建议 fallback, height, width 加为全局可配置

@lwh2015
Copy link
Contributor Author

lwh2015 commented Dec 21, 2020

建议 fallback, height, width 加为全局可配置

这个可以

danranVm pushed a commit to lwh2015/components that referenced this issue Dec 25, 2020
@danranVm danranVm added this to the v1.0.0 milestone Dec 25, 2020
lwh2015 pushed a commit to lwh2015/components that referenced this issue Dec 28, 2020
lwh2015 pushed a commit to lwh2015/components that referenced this issue Dec 29, 2020
lwh2015 pushed a commit to lwh2015/components that referenced this issue Dec 29, 2020
lwh2015 pushed a commit to lwh2015/components that referenced this issue Dec 29, 2020
lwh2015 pushed a commit to lwh2015/components that referenced this issue Dec 29, 2020
lwh2015 pushed a commit to lwh2015/components that referenced this issue Dec 29, 2020
lwh2015 pushed a commit to lwh2015/components that referenced this issue Dec 29, 2020
lwh2015 pushed a commit to lwh2015/components that referenced this issue Dec 29, 2020
lwh2015 pushed a commit to lwh2015/components that referenced this issue Dec 29, 2020
danranVm pushed a commit that referenced this issue Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants