admin管理员组文章数量:1026989
Can someone help with the TypeScript error:
Property 'srcset' does not exist on type 'DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>'.
I can't figure out what is going wrong. I also tried this solution, but no result:
declare global {
namespace JSX {
interface IntrinsicElements {
srcset: React.DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>
}
}
}
Can someone help with the TypeScript error:
Property 'srcset' does not exist on type 'DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>'.
I can't figure out what is going wrong. I also tried this solution, but no result:
declare global {
namespace JSX {
interface IntrinsicElements {
srcset: React.DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>
}
}
}
Share
Improve this question
asked Jul 17, 2019 at 16:45
Max TravisMax Travis
1,3284 gold badges22 silver badges43 bronze badges
1
- stackoverflow./a/34695900/367865 – Ouroborus Commented Jul 17, 2019 at 17:32
1 Answer
Reset to default 7The solution is to use srcSet
instead of srcset
-> Why is React.js removing the srcset tag on <img />?
Can someone help with the TypeScript error:
Property 'srcset' does not exist on type 'DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>'.
I can't figure out what is going wrong. I also tried this solution, but no result:
declare global {
namespace JSX {
interface IntrinsicElements {
srcset: React.DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>
}
}
}
Can someone help with the TypeScript error:
Property 'srcset' does not exist on type 'DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>'.
I can't figure out what is going wrong. I also tried this solution, but no result:
declare global {
namespace JSX {
interface IntrinsicElements {
srcset: React.DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>
}
}
}
Share
Improve this question
asked Jul 17, 2019 at 16:45
Max TravisMax Travis
1,3284 gold badges22 silver badges43 bronze badges
1
- stackoverflow./a/34695900/367865 – Ouroborus Commented Jul 17, 2019 at 17:32
1 Answer
Reset to default 7The solution is to use srcSet
instead of srcset
-> Why is React.js removing the srcset tag on <img />?
本文标签:
版权声明:本文标题:javascript - Property 'srcset' does not exist on type 'DetailedHTMLProps<ImgHTMLAttributes< 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745513317a2153925.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论