pyt
2025-03-05 1c4dddd5cab815cb15cbb57475a4c6f6ed60ceb2
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
<template>
    <div>
        <el-dialog :visible.sync="show" :show-close="false" width="518px" @close="$emit('close')"
            :modal-append-to-body="false">
            <div class="txt-center pt--32">
                <div class="fs--21 font-bold">退出登录 | Log Out</div>
                <div class="fs--16 mt--77 color">
                    <div>确认退出当前登录帐号吗?</div>
                    <div>Confirm to log out of this account?</div>
                </div>
                <div class="btns">
                    <el-button @click="$emit('close')">关闭 | Close</el-button>
                    <el-button @click="submit" type="primary">确认 | Confirm</el-button>
                </div>
            </div>
        </el-dialog>
    </div>
</template>
 
<script>
export default {
    components: {},
    props: {
        show: {
            type: Boolean,
            default: false
        }
    },
    data() {
        return {};
    },
    computed: {},
    watch: {},
    created() { },
    mounted() { },
    methods: {
        submit() {
            this.$store.commit('SET_USERINFO', {})
            this.$store.commit('SET_USERNAME', '')
            localStorage.clear()
            window.location.replace('/');
        }
    },
};
</script>
<style scoped lang="less">
.color {
    color: rgba(59, 63, 86, .83);
}
 
.btns {
    display: flex;
    justify-content: center;
    margin-top: 108px;
    padding-bottom: 29px;
 
    .el-button {
        width: 190px;
        height: 50px;
        font-size: 20px;
 
    }
 
    .el-button--primary {
        background-color: #014099;
        border-color: #014099;
    }
}
 
::v-deep .el-dialog {
    border-radius: 8px;
 
    .el-dialog__header {
        display: none !important;
    }
 
    .el-dialog__body {
        padding: 0 !important;
 
    }
}
</style>