From 92d65447c6681635068b212fc5d9f72c8a665d2c Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期二, 08 四月 2025 11:51:08 +0800
Subject: [PATCH] macao

---
 src/layout/component/sidebar/Sidebar.vue |   44 +++++++++++++++++++++++++++++++++++---------
 1 files changed, 35 insertions(+), 9 deletions(-)

diff --git a/src/layout/component/sidebar/Sidebar.vue b/src/layout/component/sidebar/Sidebar.vue
index 832c507..a21174d 100644
--- a/src/layout/component/sidebar/Sidebar.vue
+++ b/src/layout/component/sidebar/Sidebar.vue
@@ -1,25 +1,35 @@
 <template>
-	<div class="pc-chat_aside flex-0">
+	<div  class="pc-chat_aside flex-0 relative" :style="`width: ${leftWidth}px;`">
 		<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"> WI 姘村姟鏅鸿兘骞冲彴</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="aside_center">
 			<ChatRecord />
 		</div>
 		<div class="aside_bottom">
 			<MenuList />
 		</div>
+		<div class="hide-sidebar" @click="toggleSidebar">
+			<i class="text-[#fff] transition-all ywifont" :class="isShow ? 'ywicon-zuoyoujiantou' : 'ywicon-zuoyoujiantou1'"></i>
+		</div>
 	</div>
 </template>
 
 <script setup lang="ts">
+import { computed } from 'vue';
 import ChatRecord from './components/ChatRecord.vue';
 import MenuList from './components/MenuList.vue';
+import { toggleSidebar } from '/@/stores/chatRoom';
+const emit = defineEmits(['toggleSidebar']);
+
+const prop = defineProps(['isShow']);
+const leftWidth= computed(()=>prop.isShow ? 252:0)
 </script>
 
 <style scoped lang="scss">
@@ -35,18 +45,34 @@
 	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;
+	background-color: var(--color-bg-side);
 	overflow: visible;
-	-webkit-transition: width 0.1s ease-in;
-	-o-transition: width 0.1s ease-in;
-	transition: width 0.1s ease-in;
+	// -webkit-transition: width 0.1s ease-in;
+	// -o-transition: width 0.1s ease-in;
+	// transition: width 0.1s ease-in;
 	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;
 	position: relative;

--
Gitblit v1.9.3