yangyin
2024-11-26 ea24bd60c42e8284415e37e7992768a470abe777
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<template>
    <div class="pc-chat_aside flex-0 relative" :style="`width: ${leftBox}px;transition: 0.7s ease-in;`">
        <div class="aside_top">
            <div class="logo flex-items-center justify-between">
                <div class="flex items-center">
                    <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">
            <ChatRecord />
        </div>
        <div class="aside_bottom">
            <MenuList />
        </div>
    </div>
</template>
 
<script setup lang="ts">
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">
.pc-chat_room {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    background-color: #1c1e1d;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.pc-chat_aside {
    // width: 252px !important;
    height: 100%;
    box-sizing: border-box;
    background-color: #1b1d1c;
    overflow: visible;
    -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;
    width: 100%;
    padding: 18px;
}
.layout-logo-medium-img {
    width: 28px;
    margin-right: 7px;
}
.aside_center {
    flex: 1;
    min-height: 0;
    -webkit-transition: height 0.3s ease-in;
    -o-transition: height 0.3s ease-in;
    transition: height 0.3s ease-in;
}
.aside_bottom {
    position: relative;
    width: 100%;
    padding-bottom: 20px;
    -webkit-transition: height 0.3s ease-in;
    -o-transition: height 0.3s ease-in;
    transition: height 0.3s ease-in;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
}
</style>