fix(StudyCoursePage): 修复课程详情显示条件逻辑
当课程没有特色、亮点或学习目标时,才显示"暂无详情"。修复了原本逻辑中空状态和详情可能同时显示的问题
Showing
1 changed file
with
2 additions
and
2 deletions
| ... | @@ -40,7 +40,7 @@ | ... | @@ -40,7 +40,7 @@ |
| 40 | </div> | 40 | </div> |
| 41 | </div> | 41 | </div> |
| 42 | 42 | ||
| 43 | - <div id="detail" class="py-4 px-4"> | 43 | + <div v-if="course?.feature || course?.highlights || course?.learning_goal" id="detail" class="py-4 px-4"> |
| 44 | <div v-if="course?.feature"> | 44 | <div v-if="course?.feature"> |
| 45 | <div class="text-black text-xl font-bold mb-2">课程特色</div> | 45 | <div class="text-black text-xl font-bold mb-2">课程特色</div> |
| 46 | <div class="text-gray-700 text-sm leading-relaxed" v-html="course?.feature"></div> | 46 | <div class="text-gray-700 text-sm leading-relaxed" v-html="course?.feature"></div> |
| ... | @@ -56,7 +56,7 @@ | ... | @@ -56,7 +56,7 @@ |
| 56 | <div class="text-gray-700 text-sm leading-relaxed" v-html="course?.learning_goal"></div> | 56 | <div class="text-gray-700 text-sm leading-relaxed" v-html="course?.learning_goal"></div> |
| 57 | <br /> | 57 | <br /> |
| 58 | </div> | 58 | </div> |
| 59 | - <van-empty v-else description="暂无详情" /> | 59 | + <van-empty v-if="!course?.feature && !course?.highlights && !course?.learning_goal" description="暂无详情" /> |
| 60 | </div> | 60 | </div> |
| 61 | 61 | ||
| 62 | <div class="h-2 bg-gray-100"></div> | 62 | <div class="h-2 bg-gray-100"></div> | ... | ... |
-
Please register or login to post a comment