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
fix: custom height and iframe SecurityError #26
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/react-component/image/l7y8aq45m |
Codecov Report
@@ Coverage Diff @@
## master #26 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 137 139 +2
Branches 32 33 +1
=========================================
+ Hits 137 139 +2
Continue to review full report at Codecov.
|
src/Image.tsx
Outdated
@@ -102,6 +102,7 @@ const ImageInternal: React.FC<ImageProps> = ({ | |||
className: cn(`${prefixCls}-img`, { | |||
[`${prefixCls}-img-placeholder`]: placeholder === true, | |||
}), | |||
style: { height }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
width 也传进来?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
width 不用,width 是 100%
,只要有一个就能满足了
package.json
Outdated
@@ -63,6 +63,6 @@ | |||
"np": "^6.3.2", | |||
"react": "^16.13.1", | |||
"react-dom": "^16.13.1", | |||
"typescript": "^4.0.2" | |||
"typescript": "^3.9.7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥改回来了。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4.0 配合 eslint
有问题 typescript-eslint/typescript-eslint#1436
发现是 yarn 的问题,改回来了
Resolve ant-design/ant-design#26593
Resolve #16 (comment)