2025-07-10 16:41:28 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<u-popup v-model="showPopup" width="550rpx">
|
|
|
|
|
|
<view class="drawer-container">
|
|
|
|
|
|
<view class="drawer-header">
|
2025-11-26 13:50:27 +08:00
|
|
|
|
<view class="header-top">
|
|
|
|
|
|
<view class="header-tabs">
|
|
|
|
|
|
<u-tabs
|
|
|
|
|
|
:list="tabList"
|
|
|
|
|
|
:is-scroll="false"
|
|
|
|
|
|
:current="currentTab"
|
|
|
|
|
|
@change="changeTab"
|
|
|
|
|
|
bg-color="transparent"
|
|
|
|
|
|
active-color="#4F6AFF"
|
|
|
|
|
|
inactive-color="#505866"
|
|
|
|
|
|
bar-width="80"
|
|
|
|
|
|
font-size="32"
|
|
|
|
|
|
:bold="true"
|
|
|
|
|
|
></u-tabs>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="header-icon" @click="handleHistoryClick">
|
|
|
|
|
|
<u-icon name="clock" size="40" color="#333333"></u-icon>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="drawer-title header-bottom"
|
|
|
|
|
|
@click="handleCreateConversation"
|
|
|
|
|
|
>
|
2025-07-10 16:41:28 +08:00
|
|
|
|
<u-icon
|
|
|
|
|
|
class="drawer-title-icon"
|
|
|
|
|
|
name="plus"
|
|
|
|
|
|
size="32rpx"
|
|
|
|
|
|
color="#666666"
|
|
|
|
|
|
></u-icon>
|
|
|
|
|
|
新建对话
|
2025-11-26 13:50:27 +08:00
|
|
|
|
</view>
|
2025-07-10 16:41:28 +08:00
|
|
|
|
</view>
|
2025-07-11 16:38:12 +08:00
|
|
|
|
<scroll-view
|
|
|
|
|
|
scroll-y
|
|
|
|
|
|
class="chat-history-list"
|
|
|
|
|
|
:scroll-into-view="scrollToView"
|
|
|
|
|
|
:show-scrollbar="false"
|
|
|
|
|
|
scroll-with-animation="true"
|
|
|
|
|
|
>
|
2025-07-10 16:41:28 +08:00
|
|
|
|
<!-- 使用新的数据结构渲染聊天历史 -->
|
|
|
|
|
|
<view
|
|
|
|
|
|
v-for="(group, groupIndex) in chatHistoryList3"
|
|
|
|
|
|
:key="'group-' + group.id + groupIndex"
|
2025-11-26 15:49:43 +08:00
|
|
|
|
@click="closePopover"
|
2025-07-10 16:41:28 +08:00
|
|
|
|
>
|
|
|
|
|
|
<!-- 日期标题 -->
|
|
|
|
|
|
<view class="chat-day">
|
|
|
|
|
|
<text class="day-text">{{ group.id }}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 该日期下的对话列表 -->
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="chat-item"
|
|
|
|
|
|
v-for="(item, index) in group.conversation"
|
|
|
|
|
|
:key="'conv-' + groupIndex + '-' + index"
|
2025-07-11 16:38:12 +08:00
|
|
|
|
:id="'chat-item-' + item.id"
|
2025-07-10 16:41:28 +08:00
|
|
|
|
:class="{
|
2025-07-11 13:43:04 +08:00
|
|
|
|
'chat-item-active': item.isActiveChat,
|
2025-07-10 16:41:28 +08:00
|
|
|
|
}"
|
2025-12-01 15:12:11 +08:00
|
|
|
|
@click.stop="
|
|
|
|
|
|
selectChatItem(groupIndex, index, item.id, item.conversationId)
|
|
|
|
|
|
"
|
2025-07-10 16:41:28 +08:00
|
|
|
|
>
|
2025-11-26 15:49:43 +08:00
|
|
|
|
<view class="chat-item-content">
|
|
|
|
|
|
<text class="chat-text u-line-1">{{ item.title }}</text>
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="more-icon"
|
|
|
|
|
|
v-if="item.isActiveChat"
|
|
|
|
|
|
:id="'more-' + item.id"
|
|
|
|
|
|
@click.stop="togglePopover(item.id)"
|
|
|
|
|
|
>
|
|
|
|
|
|
<image
|
|
|
|
|
|
style="width: 40rpx; height: 40rpx"
|
|
|
|
|
|
src="/static/common/images/icon-more-white.png"
|
|
|
|
|
|
></image>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Popover菜单 -->
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="popover-menu"
|
|
|
|
|
|
v-if="activePopoverId === item.id"
|
|
|
|
|
|
@click.stop
|
|
|
|
|
|
>
|
|
|
|
|
|
<view
|
|
|
|
|
|
class="popover-item"
|
2025-12-01 15:12:11 +08:00
|
|
|
|
@click.stop="
|
|
|
|
|
|
selectChatItem(
|
|
|
|
|
|
groupIndex,
|
|
|
|
|
|
index,
|
|
|
|
|
|
item.id,
|
|
|
|
|
|
item.conversationId
|
|
|
|
|
|
)
|
|
|
|
|
|
"
|
2025-11-26 15:49:43 +08:00
|
|
|
|
>
|
|
|
|
|
|
<u-icon
|
|
|
|
|
|
name="chat"
|
|
|
|
|
|
color="#4f6aff"
|
|
|
|
|
|
size="32"
|
|
|
|
|
|
custom-style="margin-right: 12rpx"
|
|
|
|
|
|
></u-icon>
|
|
|
|
|
|
<text class="popover-text" style="color: #4f6aff">回复</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="popover-item" @click="handleDelete(item)">
|
|
|
|
|
|
<u-icon
|
|
|
|
|
|
name="trash"
|
|
|
|
|
|
color="#fa3534"
|
|
|
|
|
|
size="32"
|
|
|
|
|
|
custom-style="margin-right: 12rpx"
|
|
|
|
|
|
></u-icon>
|
|
|
|
|
|
<text class="popover-text" style="color: #fa3534">删除</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2025-07-10 16:41:28 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2025-07-11 16:38:12 +08:00
|
|
|
|
|
2025-07-11 16:04:45 +08:00
|
|
|
|
<!-- 添加底部空白区域 -->
|
|
|
|
|
|
<view class="bottom-space"></view>
|
2025-07-10 16:41:28 +08:00
|
|
|
|
</scroll-view>
|
|
|
|
|
|
|
|
|
|
|
|
<view class="drawer-footer">
|
|
|
|
|
|
<view class="user-info">
|
2025-12-08 10:48:26 +08:00
|
|
|
|
<image class="user-avatar" :src="headSculptureUrl"></image>
|
2025-07-10 16:41:28 +08:00
|
|
|
|
<text class="user-name">{{ userName || "晓德塔," }}</text>
|
|
|
|
|
|
</view>
|
2025-11-10 16:45:03 +08:00
|
|
|
|
<view class="settings" @click="handleSettingsClick">
|
2025-07-10 16:41:28 +08:00
|
|
|
|
<u-icon name="setting" size="40rpx" color="#999"></u-icon>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2025-11-26 15:49:43 +08:00
|
|
|
|
|
|
|
|
|
|
<!-- 删除确认弹窗:使用 uView 的 u-modal 组件实现 -->
|
|
|
|
|
|
<!-- <u-modal
|
|
|
|
|
|
border-radius="20rpx"
|
|
|
|
|
|
v-model="deleteConfirmShow"
|
|
|
|
|
|
title="提示"
|
|
|
|
|
|
content="删除后,该对话将不可恢复。确认删除吗?"
|
|
|
|
|
|
:show-cancel-button="true"
|
|
|
|
|
|
@confirm="confirmDelete"
|
|
|
|
|
|
@cancel="cancelDelete"
|
|
|
|
|
|
></u-modal> -->
|
2025-07-10 16:41:28 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: "ChatHistory",
|
|
|
|
|
|
props: {
|
|
|
|
|
|
show: {
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
default: false,
|
|
|
|
|
|
},
|
|
|
|
|
|
chatHistoryList3: {
|
|
|
|
|
|
type: Array,
|
|
|
|
|
|
default: () => [],
|
|
|
|
|
|
},
|
|
|
|
|
|
activeIndex: {
|
|
|
|
|
|
type: Number,
|
|
|
|
|
|
default: 0,
|
|
|
|
|
|
},
|
|
|
|
|
|
userName: {
|
|
|
|
|
|
type: String,
|
|
|
|
|
|
default: "",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2025-12-08 10:48:26 +08:00
|
|
|
|
baseUrl: "",
|
2025-07-10 16:41:28 +08:00
|
|
|
|
showPopup: false,
|
|
|
|
|
|
currentActiveGroup: -1,
|
|
|
|
|
|
currentActiveIndex: -1,
|
2025-07-11 16:38:12 +08:00
|
|
|
|
activeItemId: "", // 存储当前激活项的ID
|
|
|
|
|
|
scrollToView: "", // 用于scroll-into-view属性
|
2025-11-26 13:50:27 +08:00
|
|
|
|
tabList: [
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "AI咨询",
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: "人工咨询",
|
|
|
|
|
|
},
|
|
|
|
|
|
],
|
|
|
|
|
|
currentTab: 0,
|
2025-11-26 15:49:43 +08:00
|
|
|
|
activePopoverId: null, // 当前打开的popover对应的itemId
|
|
|
|
|
|
// 删除确认弹窗的显示状态与目标项
|
|
|
|
|
|
// deleteConfirmShow: false,
|
|
|
|
|
|
// deleteTargetItem: null,
|
2025-07-10 16:41:28 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
2025-12-08 10:48:26 +08:00
|
|
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
|
|
headSculptureUrl() {
|
|
|
|
|
|
if (this.vuex_user.HeadSculptureUrl) {
|
|
|
|
|
|
return this.baseUrl + "/" + this.vuex_user.HeadSculptureUrl;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return "/static/common/images/avatar.png";
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2025-07-10 16:41:28 +08:00
|
|
|
|
watch: {
|
|
|
|
|
|
show: {
|
|
|
|
|
|
handler(newVal) {
|
|
|
|
|
|
this.showPopup = newVal;
|
2025-11-26 15:49:43 +08:00
|
|
|
|
// 弹层每次打开时,收起右侧“回复/删除”浮窗
|
|
|
|
|
|
if (newVal) {
|
|
|
|
|
|
this.activePopoverId = null;
|
|
|
|
|
|
}
|
2025-07-10 16:41:28 +08:00
|
|
|
|
},
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
},
|
|
|
|
|
|
showPopup(val) {
|
|
|
|
|
|
if (val !== this.show) {
|
|
|
|
|
|
this.$emit("update:show", val);
|
|
|
|
|
|
}
|
2025-11-26 15:49:43 +08:00
|
|
|
|
// 兼容从内部改变显示状态的场景,打开时关闭浮窗
|
|
|
|
|
|
if (val) {
|
2025-12-08 10:48:26 +08:00
|
|
|
|
this.baseUrl = this.$u.http.config.baseUrl;
|
2025-11-26 15:49:43 +08:00
|
|
|
|
this.activePopoverId = null;
|
|
|
|
|
|
}
|
2025-07-10 16:41:28 +08:00
|
|
|
|
},
|
2025-07-11 16:38:12 +08:00
|
|
|
|
// 监听聊天历史数据变化,找到激活项并滚动
|
|
|
|
|
|
chatHistoryList3: {
|
|
|
|
|
|
handler() {
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
|
this.scrollToActiveItem();
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
deep: true,
|
|
|
|
|
|
immediate: true,
|
|
|
|
|
|
},
|
2025-07-10 16:41:28 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
2025-11-26 13:50:27 +08:00
|
|
|
|
// 处理历史记录点击事件
|
|
|
|
|
|
handleHistoryClick() {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: "/pages/home/history/history",
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2025-11-10 16:45:03 +08:00
|
|
|
|
// 处理设置点击事件
|
|
|
|
|
|
handleSettingsClick() {
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
url: "/pages/home/userSetting/index",
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
2025-11-26 15:49:43 +08:00
|
|
|
|
// 关闭Popover
|
|
|
|
|
|
closePopover() {
|
|
|
|
|
|
this.activePopoverId = null;
|
|
|
|
|
|
},
|
|
|
|
|
|
// 切换Popover显示状态
|
|
|
|
|
|
togglePopover(itemId) {
|
|
|
|
|
|
if (this.activePopoverId === itemId) {
|
|
|
|
|
|
this.activePopoverId = null;
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.activePopoverId = itemId;
|
|
|
|
|
|
},
|
|
|
|
|
|
// 处理回复(暂时无用)
|
|
|
|
|
|
// handleReply(item) {
|
|
|
|
|
|
// this.closePopover();
|
|
|
|
|
|
// // 这里添加回复逻辑,比如跳转或弹窗
|
|
|
|
|
|
// console.log("Reply to:", item);
|
|
|
|
|
|
// this.$emit("reply-conversation", item);
|
|
|
|
|
|
// },
|
|
|
|
|
|
// 处理删除
|
|
|
|
|
|
handleDelete(item) {
|
|
|
|
|
|
// 关闭右侧浮窗,弹出确认弹窗
|
|
|
|
|
|
this.closePopover();
|
|
|
|
|
|
// this.deleteTargetItem = item;
|
|
|
|
|
|
// this.deleteConfirmShow = true;
|
|
|
|
|
|
|
|
|
|
|
|
this.$u.api
|
|
|
|
|
|
.DeleteDialogueManagement({
|
2025-11-28 14:51:23 +08:00
|
|
|
|
id: [item.id],
|
2025-11-26 15:49:43 +08:00
|
|
|
|
})
|
|
|
|
|
|
.then((res) => {
|
|
|
|
|
|
if (res.succeed) {
|
|
|
|
|
|
this.$u.toast("删除成功");
|
|
|
|
|
|
// 刷新聊天历史数据
|
|
|
|
|
|
this.$emit("refresh-chat-history");
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$u.toast(res.msg || "删除失败");
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
// // 确认删除:确认后发出删除事件并重置状态
|
|
|
|
|
|
// confirmDelete() {
|
|
|
|
|
|
// if (this.deleteTargetItem) {
|
|
|
|
|
|
// this.$emit("delete-conversation", this.deleteTargetItem);
|
|
|
|
|
|
// }
|
|
|
|
|
|
// this.deleteTargetItem = null;
|
|
|
|
|
|
// this.deleteConfirmShow = false;
|
|
|
|
|
|
// },
|
|
|
|
|
|
// // 取消删除:仅关闭弹窗并清空目标
|
|
|
|
|
|
// cancelDelete() {
|
|
|
|
|
|
// this.deleteConfirmShow = false;
|
|
|
|
|
|
// this.deleteTargetItem = null;
|
|
|
|
|
|
// },
|
2025-07-11 16:38:12 +08:00
|
|
|
|
// 滚动到激活的聊天项
|
|
|
|
|
|
scrollToActiveItem() {
|
|
|
|
|
|
// 查找激活的聊天项
|
|
|
|
|
|
let activeItemFound = false;
|
|
|
|
|
|
|
|
|
|
|
|
for (
|
|
|
|
|
|
let groupIndex = 0;
|
|
|
|
|
|
groupIndex < this.chatHistoryList3.length;
|
|
|
|
|
|
groupIndex++
|
|
|
|
|
|
) {
|
|
|
|
|
|
const group = this.chatHistoryList3[groupIndex];
|
|
|
|
|
|
for (let index = 0; index < group.conversation.length; index++) {
|
|
|
|
|
|
const item = group.conversation[index];
|
|
|
|
|
|
if (item.isActiveChat) {
|
|
|
|
|
|
activeItemFound = true;
|
|
|
|
|
|
this.activeItemId = `chat-item-${item.id}`;
|
|
|
|
|
|
// 设置scrollToView的值,使scroll-view自动滚动到该元素
|
|
|
|
|
|
this.scrollToView = this.activeItemId;
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
if (activeItemFound) break;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
2025-12-01 15:12:11 +08:00
|
|
|
|
selectChatItem(groupIndex, index, id, conversationId) {
|
2025-07-11 13:43:04 +08:00
|
|
|
|
// this.currentActiveGroup = groupIndex;
|
|
|
|
|
|
// this.currentActiveIndex = index;
|
2025-12-01 15:12:11 +08:00
|
|
|
|
console.log("selectChatItem", groupIndex, index, id, conversationId);
|
2025-07-10 16:41:28 +08:00
|
|
|
|
|
|
|
|
|
|
// 向父组件发送选中的对话信息
|
|
|
|
|
|
this.$emit("select-conversation", {
|
2025-12-01 15:12:11 +08:00
|
|
|
|
id,
|
2025-07-10 16:41:28 +08:00
|
|
|
|
conversationId,
|
|
|
|
|
|
});
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
handleCreateConversation() {
|
|
|
|
|
|
this.$emit("create-conversation");
|
|
|
|
|
|
},
|
2025-11-26 13:50:27 +08:00
|
|
|
|
changeTab(index) {
|
|
|
|
|
|
this.currentTab = index;
|
|
|
|
|
|
},
|
2025-07-10 16:41:28 +08:00
|
|
|
|
},
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.drawer-container {
|
|
|
|
|
|
padding: 32rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
height: 100vh;
|
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
|
|
|
|
|
|
.drawer-header {
|
2025-11-26 13:50:27 +08:00
|
|
|
|
.header-top {
|
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
margin-bottom: 20rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.header-tabs {
|
|
|
|
|
|
width: 300rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
.header-icon {
|
|
|
|
|
|
width: 40rpx;
|
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.header-bottom {
|
|
|
|
|
|
padding: 16rpx 32rpx;
|
|
|
|
|
|
}
|
2025-07-10 16:41:28 +08:00
|
|
|
|
|
|
|
|
|
|
.drawer-title {
|
|
|
|
|
|
font-family: DouyinSans;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
font-size: 32rpx;
|
|
|
|
|
|
color: #666666;
|
|
|
|
|
|
|
|
|
|
|
|
.drawer-title-icon {
|
|
|
|
|
|
margin-right: 10rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.chat-history-list {
|
|
|
|
|
|
flex: 1;
|
2025-11-26 13:50:27 +08:00
|
|
|
|
height: calc(100vh - 420rpx);
|
2025-07-11 16:04:45 +08:00
|
|
|
|
padding-bottom: 20rpx;
|
2025-07-10 16:41:28 +08:00
|
|
|
|
|
|
|
|
|
|
.chat-day {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
margin: 20rpx 0 20rpx 30rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.day-text {
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
color: #999999;
|
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.chat-item {
|
2025-11-26 15:49:43 +08:00
|
|
|
|
padding: 24rpx 24rpx 24rpx 30rpx;
|
2025-07-10 16:41:28 +08:00
|
|
|
|
border-radius: 16rpx;
|
2025-11-26 15:49:43 +08:00
|
|
|
|
margin-bottom: 4rpx;
|
2025-07-11 16:04:45 +08:00
|
|
|
|
position: relative;
|
2025-11-26 15:49:43 +08:00
|
|
|
|
// overflow: hidden; // 移除overflow hidden以便显示popover
|
|
|
|
|
|
|
|
|
|
|
|
.chat-item-content {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
|
|
|
|
.more-icon {
|
|
|
|
|
|
width: 40rpx;
|
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-10 16:41:28 +08:00
|
|
|
|
|
|
|
|
|
|
.chat-text {
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
color: #303030;
|
|
|
|
|
|
font-family: PingFang SC;
|
2025-11-26 15:49:43 +08:00
|
|
|
|
flex: 1;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
margin-right: 10rpx;
|
2025-07-10 16:41:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&-active {
|
|
|
|
|
|
background-color: #4f6aff;
|
2025-07-11 16:04:45 +08:00
|
|
|
|
box-shadow: 0 2rpx 8rpx rgba(79, 106, 255, 0.3);
|
2025-07-10 16:41:28 +08:00
|
|
|
|
|
|
|
|
|
|
.chat-text {
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-11-26 15:49:43 +08:00
|
|
|
|
|
|
|
|
|
|
.popover-menu {
|
|
|
|
|
|
width: 200rpx;
|
|
|
|
|
|
// 相对当前 chat-item 进行绝对定位,随 item 滚动
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
right: 10rpx;
|
|
|
|
|
|
top: 80rpx;
|
|
|
|
|
|
background: linear-gradient(
|
|
|
|
|
|
135deg,
|
|
|
|
|
|
rgba(79, 106, 255, 0.02),
|
|
|
|
|
|
rgba(215, 237, 237, 0.01)
|
|
|
|
|
|
);
|
|
|
|
|
|
box-shadow: 0px 2px 8px 0px rgba(91, 92, 94, 0.3);
|
|
|
|
|
|
background-color: #ffffff;
|
|
|
|
|
|
border-radius: 20rpx;
|
|
|
|
|
|
padding: 10rpx 0;
|
|
|
|
|
|
z-index: 10005;
|
|
|
|
|
|
|
|
|
|
|
|
.popover-item {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 12rpx;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
padding: 20rpx 30rpx;
|
|
|
|
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.popover-text {
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
font-family: PingFang SC;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-10 16:41:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-07-11 16:38:12 +08:00
|
|
|
|
|
2025-07-11 16:04:45 +08:00
|
|
|
|
.bottom-space {
|
2025-11-26 15:49:43 +08:00
|
|
|
|
// 增加底部留白,避免最底部项的浮层阴影被裁剪
|
|
|
|
|
|
height: 200rpx;
|
2025-07-11 16:04:45 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
2025-07-10 16:41:28 +08:00
|
|
|
|
|
|
|
|
|
|
.drawer-footer {
|
2025-07-10 17:52:04 +08:00
|
|
|
|
margin-top: 20rpx;
|
2025-07-10 16:41:28 +08:00
|
|
|
|
height: 130rpx;
|
|
|
|
|
|
border: 1rpx solid #eeeeee;
|
|
|
|
|
|
border-radius: 12rpx;
|
|
|
|
|
|
padding: 0 30rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
.user-info {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
.user-avatar {
|
2025-07-11 16:38:12 +08:00
|
|
|
|
width: 56rpx;
|
2025-07-10 16:41:28 +08:00
|
|
|
|
height: 56rpx;
|
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
|
margin-right: 30rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.user-name {
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
font-family: DouyinSans;
|
|
|
|
|
|
color: #333;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.settings {
|
|
|
|
|
|
padding: 10rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|