yangyin
2024-06-30 0216e5db88382d821e4d436f83ce6a9c8f9e3441
fix: 添加退出登录
已修改1个文件
115 ■■■■■ 文件已修改
src/layout/component/sidebar/waterLeftAside/asideTitle.vue 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/component/sidebar/waterLeftAside/asideTitle.vue
@@ -12,10 +12,24 @@
                <span class="font-medium text-sm text-white tracking-wide">{{ item.title }}</span>
            </div>
        </div>
        <div class="user_text">
            <div class="user_head">
                <span
                    ><span
                        ><span class="user-head">B</span><span class="identifying"><!----></span></span
                    ><span class="user_name"> b773684 </span></span
                ><span
                    ><span><i class="ywicon icon-fold text-white" @click="showExitLogin"></i></span
                ></span>
            </div>
            <div class="pop_up actived" v-show="state.isShowExitLogin">
                <div class="exit" @click="handleExitClose"><i class="ywicon icon-tuichu"></i> 退出登录</div>
            </div>
        </div>
        <div class="user_login">
            <p class="text-white font-medium text-sm text-center">您更好的AI助手!</p>
            <div class="set-login" @click="login">
                <span class="text-stone-100 font-medium text-sm text-center">登录 / 注册</span>
                <span class="text-stone-100 font-medium text-sm text-center">{{ state.isShowLogin ? '登录 / 注册' : '会员登录' }}</span>
            </div>
        </div>
        <div class="offices">
@@ -78,6 +92,7 @@
        },
    ],
    isShowLogin: false,
    isShowExitLogin: false,
    loginForm: {
        account: '',
        pwd: '',
@@ -100,6 +115,15 @@
//登录
const onSubmit = () => {};
const currentRoute = router.currentRoute;
//是否显示退出登录弹窗
const showExitLogin = () => {
    state.isShowExitLogin = true;
};
//关闭退出登录弹窗
const handleExitClose = () => {
    state.isShowExitLogin = false;
    state.isShowLogin = false;
};
</script>
<style scoped lang="scss">
.aisde-title {
@@ -131,6 +155,95 @@
        -webkit-text-fill-color: transparent;
    }
}
.user_text {
    box-sizing: border-box;
    width: 100%;
    padding: 0 20px 10px;
    position: relative;
    .user_head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
        span:first-child {
            display: flex;
            align-items: center;
            span:first-child {
                position: relative;
                .user-head {
                    margin-right: 6px;
                    width: 30px;
                    height: 30px;
                    border-radius: 50%;
                    cursor: pointer;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    background-color: #1d86ff;
                    font-size: 12px;
                    color: #fff;
                }
                .identifying {
                    position: absolute;
                    left: 17px;
                    top: -12px;
                    color: #fff;
                    display: flex;
                }
            }
            .user_name {
                position: relative;
                width: 145px;
                overflow: hidden;
                -o-text-overflow: ellipsis;
                text-overflow: ellipsis;
                font-size: 14px;
                font-weight: 700;
                letter-spacing: 0;
                line-height: 23.17px;
                color: #fff;
                white-space: nowrap;
            }
        }
        span:last-child {
            margin-right: 21px;
            cursor: pointer;
            span {
                display: flex;
                justify-content: center;
                align-items: center;
                width: 30px;
                height: 30px;
                border: 1px solid #414141;
                border-radius: 50%;
            }
        }
    }
    .pop_up {
        position: absolute;
        top: -60px;
        left: 5px;
        width: 240px;
        min-height: 47px;
        opacity: 1;
        border-radius: 15px;
        background: #1f1f1f;
        border: 1px solid #737373;
        .exit {
            font-size: 14px;
            font-weight: 400;
            line-height: 20.27px;
            color: #b9b9b9;
            margin-top: 17px;
            margin-left: 24px;
            cursor: pointer;
            padding-bottom: 10px;
        }
    }
    .actived {
        top: -60px !important;
    }
}
.user_login {
    box-sizing: border-box;
    width: 100%;