|
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<template>
<div class="page-header-index-wide">
<a-card :bordered="false" :bodyStyle="{ padding: '16px 0', height: '100%' }" :style="{ height: '100%' }">
<div class="account-settings-info-main" :class="device" :style=" 'min-height:'+ mainInfoHeight ">
<div class="account-settings-info-left">
<a-menu
:mode="device == 'mobile' ? 'horizontal' : 'inline'"
:default-selected-keys="['settings']"
:style="{ border: '0', width: device == 'mobile' ? '560px' : 'auto'}"
type="inner"
@openChange="onOpenChange"
>
<a-menu-item key="settings">
|
|
14
|
<a @click="settingsClick()">
|
|
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
|
基本设置
</a>
</a-menu-item>
<a-menu-item key="security">
<a @click="securityClick()">安全设置</a>
</a-menu-item>
<a-menu-item key="custom">
<a @click="customClick()"> 个性化</a>
</a-menu-item>
<a-menu-item key="binding">
<a @click="bindingClick()">账户绑定</a>
</a-menu-item>
<a-menu-item key="notification">
<a @click="notificationClick()">新消息通知</a>
</a-menu-item>
</a-menu>
</div>
<div class="account-settings-info-right">
<div class="account-settings-info-title">
<span>{{ title }}</span>
</div>
<security ref="security" v-if="security"></security>
<base-setting ref="baseSetting" v-if="baseSetting"></base-setting>
<custom ref="custom" v-if="custom"></custom>
<notification ref="notification" v-if="notification"></notification>
<binding ref="binding" v-if="binding"></binding>
</div>
</div>
</a-card>
</div>
</template>
<script>
|
|
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
|
import PageLayout from '@/components/page/PageLayout'
import RouteView from "@/components/layouts/RouteView"
import {mixinDevice} from '@/utils/mixin.js'
import security from './Security'
import baseSetting from './BaseSetting'
import custom from './Custom'
import notification from './Notification'
import binding from './Binding'
export default {
components: {
RouteView,
PageLayout,
security,
baseSetting,
custom,
notification,
binding
},
mixins: [mixinDevice],
data() {
return {
// horizontal inline
mode: 'inline',
mainInfoHeight: "100%",
openKeys: [],
defaultSelectedKeys: [],
|
|
75
|
|
|
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
// cropper
preview: {},
option: {
img: '/avatar2.jpg',
info: true,
size: 1,
outputType: 'jpeg',
canScale: false,
autoCrop: true,
// 只有自动截图开启 宽度高度才生效
autoCropWidth: 180,
autoCropHeight: 180,
fixedBox: true,
// 开启宽度和高度比例
fixed: true,
fixedNumber: [1, 1]
},
|
|
93
|
|
|
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
pageTitle: '',
title: "基本设置",
security: false,
baseSetting: true,
custom: false,
notification: false,
binding: false
}
},
created() {
this.updateMenu()
},
mounted() {
this.mainInfoHeight = (window.innerHeight - 285) + "px";
},
methods: {
onOpenChange(openKeys) {
this.openKeys = openKeys
|
|
112
|
},
|
|
113
114
115
|
updateMenu() {
let routes = this.$route.matched.concat()
this.defaultSelectedKeys = [routes.pop().path]
|
|
116
|
},
|
|
117
118
119
120
121
122
123
124
|
//update-begin--Author:wangshuai Date:20200729 for:聚合路由错误 issues#1441--------------------
settingsClick() {
this.security = false
this.custom = false
this.notification = false
this.binding = false
this.baseSetting = true
this.title = "基本设置"
|
|
125
|
},
|
|
126
127
128
129
130
131
132
|
securityClick() {
this.baseSetting = false
this.custom = false;
this.notification = false
this.binding = false
this.security = true
this.title = "安全设置"
|
|
133
|
},
|
|
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
notificationClick() {
this.security = false
this.custom = false
this.baseSetting = false
this.binding = false
this.notification = true
this.title = "新消息通知"
},
bindingClick() {
this.security = false
this.baseSetting = false
this.notification = false;
this.custom = false;
this.binding = true
this.title = "账号绑定"
},
customClick() {
this.security = false
this.baseSetting = false
this.notification = false;
this.binding = false
this.custom = true;
this.title = "个性化"
}
//update-end--Author:wangshuai Date:20200729 for:聚合路由错误 issues#1441--------------------
},
}
|
|
161
162
163
|
</script>
<style lang="less" scoped>
|
|
164
165
166
167
168
|
.account-settings-info-main {
width: 100%;
display: flex;
height: 100%;
overflow: auto;
|
|
169
|
|
|
170
171
|
&.mobile {
display: block;
|
|
172
173
|
.account-settings-info-left {
|
|
174
175
176
177
178
179
|
border-right: unset;
border-bottom: 1px solid #e8e8e8;
width: 100%;
height: 50px;
overflow-x: auto;
overflow-y: scroll;
|
|
180
181
182
|
}
.account-settings-info-right {
|
|
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
padding: 20px 40px;
}
}
.account-settings-info-left {
border-right: 1px solid #e8e8e8;
width: 224px;
}
.account-settings-info-right {
flex: 1 1;
padding: 8px 40px;
.account-settings-info-title {
color: rgba(0, 0, 0, .85);
font-size: 20px;
font-weight: 500;
line-height: 28px;
margin-bottom: 12px;
}
|
|
203
|
|
|
204
205
|
.account-settings-info-view {
padding-top: 12px;
|
|
206
207
|
}
}
|
|
208
|
}
|
|
209
210
|
</style>
|