瀏覽代碼

bugfix: live

able99 4 年之前
父節點
當前提交
7098824be0
共有 1 個文件被更改,包括 8 次插入9 次删除
  1. 8 9
      jhlive/jhlive.nvue

+ 8 - 9
jhlive/jhlive.nvue

@@ -13,15 +13,15 @@
 		</view>
 		<view class="bottom-message">
 			<!-- 对话信息 -->
-			<view class="jhim-message-box">
+			<view v-if="showIm" class="jhim-message-box">
 			  <view class="jhim-message" v-for="(item, index) in imMsgs.slice(0,5)" :key="index">
 				<text class="jhim-message-text" style="color: #C8C8C8;">{{item.name}}:</text>
 				<text class="jhim-message-text">{{item.text}}</text>
 			  </view>
 			</view>
 			<!-- 下方功能 -->
-			<view v-if="showIm" class="bottom-box">
-				<view v-if="!imStatus" class="jhim-input-box">
+			<view v-if="showIm||btns.length" class="bottom-box">
+				<view v-if="showIm&&!imStatus" class="jhim-input-box">
 				  <image class="jhim-icon" :src="inputIcon"/>
 				  <input 
 					class="jhim-input"
@@ -30,24 +30,23 @@
 					v-model="imInput"
 					confirm-type="send" @confirm="$emit('onImSend', imInput)" />
 				</view>
-				<view v-else class="jhim-logining"><text class="jhim-logining-text">{{imStatus}}</text></view>
+				<view v-if="showIm&&imStatus" class="jhim-logining"><text class="jhim-logining-text">{{imStatus}}</text></view>
+				<view v-if="!showIm" class="jhim-logining"></view>
 				<!-- 按钮 -->
 				<view class="bottom-box-btns">
 					<!-- <view class="" v-if="isAuthor && showBeauty" @click="btnBeautify"> -->
 					<view v-if="isAuthor&&showBeauty" class="bottom-box-btns-arr" @click="btnBeautify">
 						<image class="btns-icon" :src="beautyIcon"/>
-						<text class="btns-text">美颜</text>
 					</view>
 					<!-- <view class="" v-if="isAuthor && showSwitch" @click="btnChangeCamera"> -->
 					<view v-if="isAuthor&&showSwitch" class="bottom-box-btns-arr" @click="btnChangeCamera">
 						<image class="btns-icon" :src="switchIcon"/>
-						<text class="btns-text">切换</text>
 					</view>
 					<view class="bottom-box-btns-arr" v-for="(item,index) in btns" :key="index" @click="clickBtns(index, item)">
 						<image class="btns-icon" :src="item.picture"/>
 						<text v-if="item.title" class="btns-text">{{item.title}}</text>
 					</view>
-					<view v-if="isAuthor&&showLike" class="bottom-box-btns-arr" @click="btnLike">
+					<view v-if="showLike" class="bottom-box-btns-arr" @click="btnLike">
 						<image class="btns-icon" :src="likeIcon"/>
 					</view>
 				</view>
@@ -115,10 +114,10 @@
 				type: String
 			}
 		},
-		onLoad() {
+		mounted() {
 			this.init();
 		},
-		onUnload() {
+		unmounted() {
 			this.destroy();
 		},
 		methods: {