weiximei 5 лет назад
Родитель
Сommit
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}>