|
|
@@ -32,9 +32,11 @@
|
|
|
<text class="col-address" style="color: #07c160;">{{ customItems[0].address }}</text>
|
|
|
</block>
|
|
|
</view>
|
|
|
- <view class="row-remark" v-if="customItems[0].remark">
|
|
|
- <text style="color: #666;font-size: 28upx;">备注:</text>{{ customItems[0].remark }}
|
|
|
- </view>
|
|
|
+ <block v-if="getRemarks(customItems).length > 0">
|
|
|
+ <view class="row-remark" v-for="(remarkItem, rIndex) in getRemarks(customItems)" :key="'remark-' + rIndex">
|
|
|
+ <text style="font-size: 28upx;">{{ remarkItem.label }}:</text>{{ remarkItem.text }}
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
</view>
|
|
|
</view>
|
|
|
</block>
|
|
|
@@ -60,7 +62,7 @@
|
|
|
<text class="col-address-popup">{{ item.address }}</text>
|
|
|
</view>
|
|
|
<view class="row-remark" v-if="item.remark">
|
|
|
- <text style="color: #666;font-size: 28upx;">备注:</text>{{ item.remark }}
|
|
|
+ <text style="font-size: 28upx;">备注:</text>{{ item.remark }}
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
@@ -176,6 +178,20 @@ export default {
|
|
|
remark: item.remark || ''
|
|
|
};
|
|
|
},
|
|
|
+ getRemarks(customItems) {
|
|
|
+ if (!customItems || !customItems.length) return [];
|
|
|
+ const remarks = customItems.map(item => item.remark).filter(remark => !!remark);
|
|
|
+ if (remarks.length === 0) {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ if (remarks.length === 1) {
|
|
|
+ return [{ label: '备注', text: remarks[0] }];
|
|
|
+ }
|
|
|
+ return remarks.map((remark, index) => ({
|
|
|
+ label: `备注${index + 1}`,
|
|
|
+ text: remark
|
|
|
+ }));
|
|
|
+ },
|
|
|
handleRowClick(customItems) {
|
|
|
if (customItems.length === 1) {
|
|
|
this.goToDetail(customItems[0].id);
|
|
|
@@ -269,7 +285,7 @@ export default {
|
|
|
|
|
|
.row-remark {
|
|
|
font-size: 26upx;
|
|
|
- color: #999;
|
|
|
+ color: hsl(0, 95%, 44%);
|
|
|
margin-top: 10upx;
|
|
|
width: 100%;
|
|
|
}
|