浏览代码

修改兼容性 replaceAll 改为 replace

yunxing 4 年之前
父节点
当前提交
f5d8eeea56
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      src/views/equipmentFacilities/ElectricWell.vue

+ 4 - 2
src/views/equipmentFacilities/ElectricWell.vue

@@ -40,7 +40,8 @@
                                 <i v-for='(info,infoIndex) in detail.brandList' :key='infoIndex'>
                                     {{ info.brandname || 'xxx' }}
                                     -
-                                    {{ info.shopsnumList ?info.shopsnumList.replaceAll(',','、'): 'xxx' }}
+                                    <!-- {{ info.shopsnumList ?info.shopsnumList.replaceAll(',','、'): 'xxx' }} -->
+                                    {{ info.shopsnumList ?info.shopsnumList.replace(/,/g,'、') : 'xxx' }}
                                     {{infoIndex===detail.brandList.length-1? '':',' }}
                                 </i>
                             </span>
@@ -61,7 +62,8 @@
                                     <i v-for='(info,infoIndex) in detail.brandList' :key='infoIndex'>
                                         {{ info.brandname || 'xxx' }}
                                         -
-                                        {{ info.shopsnumList ? info.shopsnumList.replaceAll(',','、') : 'xxx' }}
+                                        <!-- {{ info.shopsnumList ? info.shopsnumList.replaceAll(',','、') : 'xxx' }} -->
+                                        {{ info.shopsnumList ?info.shopsnumList.replace(/,/g,'、') : 'xxx' }}
                                         {{ infoIndex === detail.brandList.length - 1 ? '' : ',' }}
                                     </i>
                                 </span>