weiximei 5 년 전
부모
커밋
f786a08a9d
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1
    0
      src/pages/building/list/index.jsx

+ 1
- 0
src/pages/building/list/index.jsx 파일 보기

@@ -107,6 +107,7 @@ function CartBody(props) {
107 107
       // cover={}
108 108
       // bodyStyle={{ padding: '10px 20px' }}
109 109
     >
110
+      {/* 因为 background 方式设置图片背景,如果 图片url 存在空格或者其他特殊字符,导致显示不出来,需要进行 encodeURI(xxx) 转码 */}
110 111
     <img className={Styles.cover} style={{ background: `url(${encodeURI(((data.buildingListImg && data.buildingListImg[0]) || {}).url)})` }}   ></img>
111 112
     <div style={{ padding: '10px 20px' }}>
112 113
       <p className={Styles.cardText}>