From f31f2726228f60ae2604d4ea529f54cc3962d433 Mon Sep 17 00:00:00 2001
From: yangyin <18723093654@163.com>
Date: 星期二, 03 十二月 2024 14:17:02 +0800
Subject: [PATCH] 提交代码

---
 src/layout/component/sidebar/Sidebar.vue |   88 +++++++++++++++++++-------------------------
 1 files changed, 38 insertions(+), 50 deletions(-)

diff --git a/src/layout/component/sidebar/Sidebar.vue b/src/layout/component/sidebar/Sidebar.vue
index 56fa199..2d0a284 100644
--- a/src/layout/component/sidebar/Sidebar.vue
+++ b/src/layout/component/sidebar/Sidebar.vue
@@ -1,26 +1,38 @@
 <template>
-	<div class="pc-chat_aside flex-0">
+	<div class="pc-chat_aside flex-0 relative" :style="`width: ${leftBox}px;transition: 0.7s ease-in;`">
 		<div class="aside_top">
-			<div class="logo">
+			<div class="logo flex-items-center justify-between">
 				<div class="flex items-center">
-					<img src="/static/images/logo/logo-mini.svg" alt="logo" class="layout-logo-medium-img" />
-					<span class="font-extrabold text-xl text-white tracking-wide">姘村姟 AI骞冲彴</span>
+					<img src="/static/images/logo/logoWithNoName.png" alt="logo" class="layout-logo-medium-img" />
+					<span class="font-extrabold text-xl text-white tracking-wide"> WI 姘村姟鏅鸿兘绠″</span>
 				</div>
 			</div>
 		</div>
+		<div class="hide-sidebar" @click="toggleSidebar" v-if="!isSharePage">
+			<i class="text-[#fff] transition-all ywifont ywicon-zuoyoujiantou"></i>
+		</div>
+
 		<div class="aside_center">
-			<asideNew />
+			<ChatRecord />
 		</div>
 		<div class="aside_bottom">
-			<asideTitle />
+			<MenuList />
 		</div>
 	</div>
 </template>
 
 <script setup lang="ts">
-import asideNew from './waterLeftAside/asideNew.vue';
-import asideTitle from './waterLeftAside/asideTitle.vue';
- 
+import { computed } from 'vue';
+import ChatRecord from './components/ChatRecord.vue';
+import MenuList from './components/MenuList.vue';
+import { isSharePage } from '/@/stores/chatRoom';
+const emit = defineEmits(['toggleSidebar']);
+
+const prop = defineProps(['isShow']);
+const leftBox = computed(() => (prop.isShow ? 252 : 198));
+const toggleSidebar = () => {
+	emit('toggleSidebar', false);
+};
 </script>
 
 <style scoped lang="scss">
@@ -36,7 +48,7 @@
 	font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
 }
 .pc-chat_aside {
-	width: 252px !important;
+	// width: 252px !important;
 	height: 100%;
 	box-sizing: border-box;
 	background-color: #1b1d1c;
@@ -47,6 +59,22 @@
 	position: relative;
 	display: flex;
 	flex-direction: column;
+}
+.hide-sidebar {
+	width: 20px;
+	height: 48px;
+	background: rgba(0, 0, 0, 0.2);
+	position: absolute;
+	top: 50%;
+	right: 0px;
+	transform: translate(100%, -50%);
+	z-index: 9;
+	cursor: pointer;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	padding: 0 3px;
+	border-radius: 0px 5px 5px;
 }
 .aside_top {
 	box-sizing: border-box;
@@ -78,44 +106,4 @@
 	-ms-flex-direction: column;
 	flex-direction: column;
 }
-.pc-chat_right {
-	padding: 0;
-	background: linear-gradient(180deg, #f5f4f6 0, #f2f2f6 25%, #e9edf7);
-	position: relative;
-	margin: 6px;
-	border-radius: 10px;
-	display: block;
-	flex: 1;
-	-ms-flex-preferred-size: auto;
-	flex-basis: auto;
-	overflow: auto;
-	-webkit-box-sizing: border-box;
-	box-sizing: border-box;
-	.pc-chatRoom {
-		box-sizing: border-box;
-		padding-right: 0px;
-		position: relative;
-		font-weight: 400;
-		background-color: #f2f4f8;
-		transition: padding-right 0.25s;
-		.homeBox {
-			padding: 42px 40px 0;
-			font-size: 14px;
-			line-height: 18px;
-			box-sizing: border-box;
-		}
-		.declare {
-			position: absolute;
-			bottom: 0;
-			z-index: 9;
-			width: 100%;
-			height: 34px;
-			font-size: 14px;
-			font-weight: 400;
-			color: #999;
-			text-align: center;
-		}
-	}
-}
 </style>
-

--
Gitblit v1.9.3