Skip to content

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

@weinibear

Description

@weinibear

当上传图片名中含有(),空格等特俗字符时,如图片名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属性是解析不成功的

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions