优化页面

This commit is contained in:
pengxiaolong
2025-06-12 22:16:09 +08:00
parent 931d867c09
commit de99d32c01
63 changed files with 973 additions and 335 deletions

View File

@@ -1,23 +1,6 @@
<template>
<!-- <div class="Navigation">
<div class="Navigation-name">
{{currentConversationID}}
</div>
<image
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Navigationimg.png"
mode="scaleToFill"
class="Navigationimg"
/>
<image
@click="Returnfunc"
src="https://vv-1317974657.cos.ap-shanghai.myqcloud.com/util/Return.png"
mode="scaleToFill"
class="Return"
/>
</div> -->
<div class="dingweizhibox">
</div>
<ChatHeader class="ChatHeadercss"/>
<div class="dingweizhibox"></div>
<div class="chat">
<div :class="['tui-chat', !isPC && 'tui-chat-h5']">
<div
@@ -27,17 +10,6 @@
<slot />
</div>
<div v-if="currentConversationID" :class="['tui-chat', !isPC && 'tui-chat-h5']">
<ChatHeader
:class="[
'tui-chat-header',
!isPC && 'tui-chat-H5-header',
isUniFrameWork && 'tui-chat-uniapp-header',
]"
:isGroup="isGroup"
:headerExtensionList="headerExtensionList"
@closeChat="closeChat"
@openGroupManagement="handleGroup"
/>
<Forward @toggleMultipleSelectMode="toggleMultipleSelectMode" />
<MessageList
ref="messageListRef"
@@ -145,9 +117,9 @@ const counter = useCounterStore();
let myitem = ref();
let youritem = ref();
let MessageListinfo = ref();
onLoad((options) => {
initChat(options);
try{
myitem.value = JSON.parse(options.myitem);
console.log(myitem.value);
youritem.value = JSON.parse(options.youritem);
@@ -156,6 +128,7 @@ onLoad((options) => {
setTimeout(() => {
sendCustomMessage(myitem.value, youritem.value);
}, 1000);
}catch(e){}
});
onUnload(() => {
@@ -183,7 +156,7 @@ const messageInputRef = ref();
const messageListRef = ref<InstanceType<typeof MessageList>>();
const headerExtensionList = ref<ExtensionInfo[]>([]);
const featureConfig = TUIChatConfig.getFeatureConfig();
let marginTopcss = ref("0px");
onMounted(() => {
TUIStore.watch(StoreName.CONV, {
currentConversation: onCurrentConversationUpdate,
@@ -347,19 +320,12 @@ const handleGroup = () => {
headerExtensionList.value[0].listener.onClicked({ groupID: groupID.value });
};
function Returnfunc() {
uni.navigateBack({
delta: 1,
});
}
function changeToolbarDisplayType(type: ToolbarDisplayType) {
inputToolbarDisplayType.value = inputToolbarDisplayType.value === type ? "none" : type;
if (inputToolbarDisplayType.value !== "none" && isUniFrameWork) {
uni.$emit("scroll-to-bottom");
}
}
function scrollToLatestMessage() {
messageListRef.value?.scrollToLatestMessage();
}
@@ -455,59 +421,12 @@ function onCurrentConversationUpdate(conversation: IConversationModel) {
width: 100%;
height: 15%;
}
.tui-chat{
width: 100%;
height: 15%;
}
.tui-chat-h5 {
width: 100%;
height: 100%;
}
.tui-chat-uniapp-header{
width: 100%;
height: 100%;
}
.Navigation {
width: 100%;
height: 10%;
.ChatHeadercss{
position: fixed;
top: 0;
left: 0;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.Navigationimg {
width: 100%;
height: 200rpx;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.Navigation {
width: 100%;
height: 200rpx;
z-index: 999;
display: flex;
justify-content: center;
align-items: center;
}
.Return {
width: 50rpx;
height: 50rpx;
position: absolute;
top: 100rpx;
left: 40rpx;
z-index: 999;
}
.Navigation-name{
width: 50rpx;
height: 50rpx;
position: absolute;
top: 100rpx;
left: 300rpx;
z-index: 999;
height: 15%;
}
</style>