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

Gallery组件,当上传图片名中含有(),空格等特俗字符时,图片预览无法正常显示(是黑的) #321

Open
weinibear opened this issue Jul 15, 2020 · 0 comments

Comments

@weinibear
Copy link

weinibear commented Jul 15, 2020

当上传图片名中含有(),空格等特俗字符时,如图片名123(1).png,123 abc4.png,上传成功后,预览图片,显示不了图片(黑的),看了 Gallery这个组件源码, imgs.map( (img, i) => {
const imgStyle = {
backgroundImage: url(${img}),
backgroundSize: 'contain',
backgroundRepeat: 'no-repeat',
backgroundPosition: 'center center'
};, backgroundImage: url(${img}),这个地方,当Img中含有括号、空格等特俗字符时,backgroundImage属性是解析不成功的

@weinibear weinibear changed the title 当上传图片名中含有(),空格等特俗字符时,图片预览时是黑的 Gallery组件,当上传图片名中含有(),空格等特俗字符时,图片预览无法正常显示(是黑的) Jul 15, 2020
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

No branches or pull requests

1 participant