소스 검색

fix: 调整课程分类模块中分类展示效果

wenxingxing 2 일 전
부모
커밋
3204bb0524
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      pages/index/course.vue
  2. 1 1
      pages/index/video.vue

+ 1 - 1
pages/index/course.vue

@@ -19,7 +19,7 @@
 						<text class="textTwo">{{ cat.cateName }}</text>
 						<text class="textTwo">{{ cat.cateName }}</text>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="expand-btn" @click="categoryExpand = !categoryExpand">
+				<view v-if="categories.length>9" class="expand-btn" @click="categoryExpand = !categoryExpand">
 					<text>{{ categoryExpand ? '收起' : '展开' }}</text>
 					<text>{{ categoryExpand ? '收起' : '展开' }}</text>
 					<image :class="{ 'rotate-arrow': !categoryExpand }" src="@/static/images/new/expand.png"></image>
 					<image :class="{ 'rotate-arrow': !categoryExpand }" src="@/static/images/new/expand.png"></image>
 				</view>
 				</view>

+ 1 - 1
pages/index/video.vue

@@ -19,7 +19,7 @@
 						<text class="ellipsis2">{{ cat.cateName }}</text>
 						<text class="ellipsis2">{{ cat.cateName }}</text>
 					</view>
 					</view>
 				</view>
 				</view>
-				<view class="expand-btn" @click="categoryExpand = !categoryExpand">
+				<view v-if="categories.length>9" class="expand-btn" @click="categoryExpand = !categoryExpand">
 					<text>{{ categoryExpand ? '收起' : '展开' }}</text>
 					<text>{{ categoryExpand ? '收起' : '展开' }}</text>
 					<image :class="{ 'rotate-arrow': !categoryExpand }" src="@/static/images/new/expand.png"></image>
 					<image :class="{ 'rotate-arrow': !categoryExpand }" src="@/static/images/new/expand.png"></image>
 				</view>
 				</view>