杨航解决BUG
This commit is contained in:
+33
-14
@@ -105,7 +105,8 @@
|
||||
onActivated
|
||||
} from 'vue'
|
||||
import common from '@/common/common';
|
||||
import TouchBtn from '@/pages/course/components/touchBtn.vue'
|
||||
import { setupKeyboardHeightListener } from '@/common/common'
|
||||
import TouchBtn from '@/pages/course/components/touchBtn.vue'
|
||||
import TalkingItem from './components/talking-item.vue';
|
||||
import PreviewVue from './components/preview.vue';
|
||||
import {
|
||||
@@ -663,6 +664,7 @@
|
||||
initsocketTask()
|
||||
};
|
||||
onLoad(() => {
|
||||
changeAppHeightBottom()
|
||||
if (!common.isLogin()) {
|
||||
common.navigateTo('/pages/login/login')
|
||||
return
|
||||
@@ -689,7 +691,22 @@
|
||||
|
||||
const keyboardHeight = ref('0px')
|
||||
const setHeight = (res) => {
|
||||
keyboardHeight.value = res.height + 'px'
|
||||
keyboardHeight.value = (res.height || 0) + 'px'
|
||||
}
|
||||
const keyBoardIsHide = computed(() => {
|
||||
return parseInt(keyboardHeight.value) == 0
|
||||
})
|
||||
const bottomHeight = ref('0px')
|
||||
const totalBotHeight = computed(()=> {
|
||||
return keyBoardIsHide.value ? 0 + 'px': parseInt(keyboardHeight.value) - parseInt(bottomHeight.value) + 'px'
|
||||
})
|
||||
const changeAppHeightBottom = (height) => {
|
||||
//#ifdef APP-PLUS
|
||||
// 获取系统信息
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
// 计算安全区域底部高度
|
||||
bottomHeight.value = systemInfo.screenHeight - systemInfo.safeArea.bottom + 'px'
|
||||
// #endif
|
||||
}
|
||||
//#ifdef APP-PLUS
|
||||
onHide(() => {
|
||||
@@ -702,6 +719,7 @@
|
||||
onUnload(() => {
|
||||
watchFlag.value = 1
|
||||
socketStore?.closeSocket()
|
||||
// setupKeyboardHeightListener(changeAppHeightBottom)
|
||||
})
|
||||
defineExpose({
|
||||
refreshData
|
||||
@@ -733,13 +751,14 @@
|
||||
.index-dialog-body {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
left: 0;
|
||||
bottom: 0%;
|
||||
height: calc(100% - v-bind(keyboardHeight));
|
||||
height: calc(100% - v-bind(totalBotHeight));
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
box-sizing: border-box;
|
||||
padding-top: v-bind(pageTopPadding);
|
||||
// padding-bottom: v-bind(bottomHeight);
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
|
||||
@@ -931,7 +950,7 @@
|
||||
}
|
||||
|
||||
.talking-list {
|
||||
height: calc(100% - 832rpx + v-bind(pageTopPadding));
|
||||
height: calc(100% - 772rpx );
|
||||
padding: 12rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -942,13 +961,13 @@
|
||||
}
|
||||
|
||||
|
||||
.talking-list {
|
||||
height: calc(100% - 832rpx);
|
||||
padding: 12rpx 24rpx;
|
||||
box-sizing: border-box;
|
||||
// .talking-list {
|
||||
// height: calc(100% - 832rpx);
|
||||
// padding: 12rpx 24rpx;
|
||||
// box-sizing: border-box;
|
||||
|
||||
.talking-scroll-list {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
// .talking-scroll-list {
|
||||
// height: 100%;
|
||||
// }
|
||||
// }
|
||||
</style>
|
||||
Reference in New Issue
Block a user