|
@@ -1,16 +1,70 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="layout_wrap">
|
3
|
|
- <router-view></router-view>
|
|
3
|
+ <div class="layout_header">
|
|
4
|
+ <div class="header_left">
|
|
5
|
+ <img src="@/assets/img/logo.png" />
|
|
6
|
+ <div>星火云鸽管控平台</div>
|
|
7
|
+ </div>
|
|
8
|
+ <div class="header_right">
|
|
9
|
+ <Dropdown
|
|
10
|
+ :transfer="true"
|
|
11
|
+ @on-visible-change="userDropdownVisibleChange"
|
|
12
|
+ @on-click="userDropdownSelectChange"
|
|
13
|
+ >
|
|
14
|
+ <div class="right_user_info">
|
|
15
|
+ <div class="user_img">
|
|
16
|
+ <img src="@/assets/img/user.png" />
|
|
17
|
+ </div>
|
|
18
|
+ <div class="user_name">李一鸣</div>
|
|
19
|
+ <Icon
|
|
20
|
+ :class="['user_drop', userDropdown ? 'arrow_dropdown' : '']"
|
|
21
|
+ type="md-arrow-dropdown"
|
|
22
|
+ :size="20"
|
|
23
|
+ />
|
|
24
|
+ </div>
|
|
25
|
+ <DropdownMenu slot="list">
|
|
26
|
+ <DropdownItem name="1">个人信息</DropdownItem>
|
|
27
|
+ <DropdownItem name="2">修改密码</DropdownItem>
|
|
28
|
+ <DropdownItem name="5">更换手机号</DropdownItem>
|
|
29
|
+ <DropdownItem name="4">退出</DropdownItem>
|
|
30
|
+ </DropdownMenu>
|
|
31
|
+ </Dropdown>
|
|
32
|
+ </div>
|
|
33
|
+ </div>
|
|
34
|
+ <div class="layout_main">
|
|
35
|
+ <router-view></router-view>
|
|
36
|
+ </div>
|
4
|
37
|
</div>
|
5
|
38
|
</template>
|
6
|
39
|
|
7
|
40
|
<script>
|
8
|
41
|
export default {
|
9
|
42
|
data() {
|
10
|
|
- return {};
|
|
43
|
+ return {
|
|
44
|
+ userDropdown: false
|
|
45
|
+ };
|
11
|
46
|
},
|
12
|
|
- created() {},
|
13
|
|
- methods: {}
|
|
47
|
+ methods: {
|
|
48
|
+ // 下拉菜单显示隐藏
|
|
49
|
+ userDropdownVisibleChange(visible) {
|
|
50
|
+ this.userDropdown = visible;
|
|
51
|
+ },
|
|
52
|
+ // 用户点击下拉菜单项
|
|
53
|
+ userDropdownSelectChange(name) {
|
|
54
|
+ if (name === "1") {
|
|
55
|
+ // 个人中心
|
|
56
|
+ } else if (name === "2") {
|
|
57
|
+ // 修改密码
|
|
58
|
+ } else if (name === "3") {
|
|
59
|
+ // 更换手机号
|
|
60
|
+ } else if (name === "4") {
|
|
61
|
+ // 退出
|
|
62
|
+ this.toLoginOut();
|
|
63
|
+ }
|
|
64
|
+ },
|
|
65
|
+ // 退出
|
|
66
|
+ toLoginOut() {}
|
|
67
|
+ }
|
14
|
68
|
};
|
15
|
69
|
</script>
|
16
|
70
|
|
|
@@ -20,5 +74,62 @@ export default {
|
20
|
74
|
height: 100vh;
|
21
|
75
|
background-color: #f1f6fc;
|
22
|
76
|
overflow: auto;
|
|
77
|
+ .layout_header {
|
|
78
|
+ display: flex;
|
|
79
|
+ justify-content: space-between;
|
|
80
|
+ align-items: center;
|
|
81
|
+ padding: 0 16px;
|
|
82
|
+ height: 50px;
|
|
83
|
+ background-color: #fff;
|
|
84
|
+ .header_left {
|
|
85
|
+ display: flex;
|
|
86
|
+ justify-content: flex-start;
|
|
87
|
+ align-items: center;
|
|
88
|
+ font-size: 24px;
|
|
89
|
+ font-weight: bold;
|
|
90
|
+ img {
|
|
91
|
+ margin-right: 10px;
|
|
92
|
+ width: 36px;
|
|
93
|
+ height: 36px;
|
|
94
|
+ }
|
|
95
|
+ }
|
|
96
|
+ .header_right {
|
|
97
|
+ display: flex;
|
|
98
|
+ justify-content: flex-end;
|
|
99
|
+ align-items: center;
|
|
100
|
+ .right_user_info {
|
|
101
|
+ display: flex;
|
|
102
|
+ justify-content: center;
|
|
103
|
+ align-items: center;
|
|
104
|
+ cursor: pointer;
|
|
105
|
+ .user_img {
|
|
106
|
+ width: 30px;
|
|
107
|
+ height: 30px;
|
|
108
|
+ overflow: hidden;
|
|
109
|
+ img {
|
|
110
|
+ width: 100%;
|
|
111
|
+ height: 100%;
|
|
112
|
+ border-radius: 50%;
|
|
113
|
+ object-fit: cover;
|
|
114
|
+ }
|
|
115
|
+ }
|
|
116
|
+ .user_name {
|
|
117
|
+ margin: 0 6px 0 10px;
|
|
118
|
+ }
|
|
119
|
+ .user_drop {
|
|
120
|
+ transition: all 0.2s ease-in-out;
|
|
121
|
+ &.arrow_dropdown {
|
|
122
|
+ transform: rotate(180deg);
|
|
123
|
+ }
|
|
124
|
+ }
|
|
125
|
+ }
|
|
126
|
+ }
|
|
127
|
+ }
|
|
128
|
+ .layout_main {
|
|
129
|
+ position: relative;
|
|
130
|
+ width: 100%;
|
|
131
|
+ height: calc(100% - 50px);
|
|
132
|
+ overflow: auto;
|
|
133
|
+ }
|
23
|
134
|
}
|
24
|
135
|
</style>
|