Jelajahi Sumber

merge: live fav

able99 4 tahun lalu
induk
melakukan
659e1943fb
1 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 6 2
      jhlive/jhlive.nvue

+ 6 - 2
jhlive/jhlive.nvue

@@ -4,12 +4,12 @@
 		 :isAuthor="isAuthor" :linkMic="linkMic" @onError="onError" @onRemoteUserEnterRoom="onRemoteUserEnterRoom"
 		 @onRemoteUserLeaveRoom="onRemoteUserLeaveRoom" />
 		<view class="top_left_box">
-			<image class="top_left_box_img" :src="avatar"></image>
+			<image class="top_left_box_img" :src="avatar" mode="aspectFill"></image>
 			<view class="top_left_box_text">
 				<text class="top_left_box_text1">{{title}}</text>
 				<text class="top_left_box_text2">{{subtitle}}</text>
 			</view>
-			<view v-if="showFav" class="top_left_box_collect">
+			<view v-if="showFav" class="top_left_box_collect" @click="onLiveFav">
 				<text class="top_left_box_collect_text">{{isFav?textFav:textNotFav}}</text>
 			</view>
 			<!-- <image v-if="showFav" class="top_left_box_collect" :src="isFav?collect:notCollect" @click="$emit('onFav', isFav)"></image> -->
@@ -206,6 +206,10 @@
 			},
 			clickBtns(index, item) {
 				this.$emit("onBtnClick", index, item);
+			},
+			// 关注点击事件
+			onLiveFav() {
+				this.$emit("onLiveFav", this.isFav);
 			}
 		}
 	};