Pārlūkot izejas kodu

fix: 报名人数未渲染(v-if/v-else 双 text 在小程序里有兼容问题)

把双 <text> + v-if/v-else 改成单 <text> 内联三元,逻辑等价但更可靠。
文案:「报名中 · 已报 X 人」或「已报 X/Y 人」,数字与「报名中」均用品牌绿。
Developer 5 dienas atpakaļ
vecāks
revīzija
73b22a4666
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5 3
      components/pages/nonprofitActivety/index.vue

+ 5 - 3
components/pages/nonprofitActivety/index.vue

@@ -26,9 +26,8 @@
 		</view>
 		<view class="na-bottom adfacjb">
 			<view class="na-bottom-left adf" v-if="item.activeState===0||item.activeState===1">
-				<text>报名中</text>
-				<text class="na-bottom-count" v-if="item.recruitmentMax"> · 已报{{ item.recruitmentNow || 0 }}/{{ item.recruitmentMax }}人</text>
-				<text class="na-bottom-count" v-else> · 已报{{ item.recruitmentNow || 0 }}人</text>
+				<text class="na-bottom-status">报名中</text>
+				<text class="na-bottom-count"> · 已报{{ item.recruitmentNow || 0 }}{{ item.recruitmentMax ? '/' + item.recruitmentMax : '' }}人</text>
 			</view>
 			<!-- <view class="na-bottom-right" @click.stop="toApply">立即报名</view> -->
 		</view>
@@ -159,6 +158,9 @@
 				color: #676775;
 				line-height: 24rpx;
 			}
+			&-status{
+				color: #70CF52;
+			}
 			&-count{
 				color: #70CF52;
 			}