|
|
@@ -1,13 +1,47 @@
|
|
1
|
1
|
<template>
|
|
2
|
2
|
<div class="drawer-container">
|
|
3
|
3
|
<div>
|
|
4
|
|
- <h3 class="drawer-title">系统布局配置</h3>
|
|
|
4
|
+ <div class="setting-drawer-content">
|
|
|
5
|
+ <div class="setting-drawer-title">
|
|
|
6
|
+ <h3 class="drawer-title">主题风格设置</h3>
|
|
|
7
|
+ </div>
|
|
|
8
|
+ <div class="setting-drawer-block-checbox">
|
|
|
9
|
+ <div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-dark')">
|
|
|
10
|
+ <img src="@/assets/images/dark.svg" alt="dark">
|
|
|
11
|
+ <div v-if="sideTheme === 'theme-dark'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
|
|
|
12
|
+ <i aria-label="图标: check" class="anticon anticon-check">
|
|
|
13
|
+ <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true"
|
|
|
14
|
+ focusable="false" class="">
|
|
|
15
|
+ <path
|
|
|
16
|
+ d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"/>
|
|
|
17
|
+ </svg>
|
|
|
18
|
+ </i>
|
|
|
19
|
+ </div>
|
|
|
20
|
+ </div>
|
|
|
21
|
+ <div class="setting-drawer-block-checbox-item" @click="handleTheme('theme-light')">
|
|
|
22
|
+ <img src="@/assets/images/light.svg" alt="light">
|
|
|
23
|
+ <div v-if="sideTheme === 'theme-light'" class="setting-drawer-block-checbox-selectIcon" style="display: block;">
|
|
|
24
|
+ <i aria-label="图标: check" class="anticon anticon-check">
|
|
|
25
|
+ <svg viewBox="64 64 896 896" data-icon="check" width="1em" height="1em" :fill="theme" aria-hidden="true"
|
|
|
26
|
+ focusable="false" class="">
|
|
|
27
|
+ <path
|
|
|
28
|
+ d="M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 0 0-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"/>
|
|
|
29
|
+ </svg>
|
|
|
30
|
+ </i>
|
|
|
31
|
+ </div>
|
|
|
32
|
+ </div>
|
|
|
33
|
+ </div>
|
|
5
|
34
|
|
|
6
|
|
- <div class="drawer-item">
|
|
7
|
|
- <span>主题颜色</span>
|
|
8
|
|
- <theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" />
|
|
|
35
|
+ <div class="drawer-item">
|
|
|
36
|
+ <span>主题颜色</span>
|
|
|
37
|
+ <theme-picker style="float: right;height: 26px;margin: -3px 8px 0 0;" @change="themeChange" />
|
|
|
38
|
+ </div>
|
|
9
|
39
|
</div>
|
|
10
|
40
|
|
|
|
41
|
+ <el-divider/>
|
|
|
42
|
+
|
|
|
43
|
+ <h3 class="drawer-title">系统布局配置</h3>
|
|
|
44
|
+
|
|
11
|
45
|
<div class="drawer-item">
|
|
12
|
46
|
<span>开启 Tags-Views</span>
|
|
13
|
47
|
<el-switch v-model="tagsView" class="drawer-switch" />
|
|
|
@@ -36,6 +70,12 @@ export default {
|
|
36
|
70
|
return {}
|
|
37
|
71
|
},
|
|
38
|
72
|
computed: {
|
|
|
73
|
+ theme() {
|
|
|
74
|
+ return this.$store.state.settings.theme
|
|
|
75
|
+ },
|
|
|
76
|
+ sideTheme() {
|
|
|
77
|
+ return this.$store.state.settings.sideTheme
|
|
|
78
|
+ },
|
|
39
|
79
|
fixedHeader: {
|
|
40
|
80
|
get() {
|
|
41
|
81
|
return this.$store.state.settings.fixedHeader
|
|
|
@@ -76,33 +116,82 @@ export default {
|
|
76
|
116
|
key: 'theme',
|
|
77
|
117
|
value: val
|
|
78
|
118
|
})
|
|
|
119
|
+ },
|
|
|
120
|
+ handleTheme(val) {
|
|
|
121
|
+ this.$store.dispatch('settings/changeSetting', {
|
|
|
122
|
+ key: 'sideTheme',
|
|
|
123
|
+ value: val
|
|
|
124
|
+ })
|
|
79
|
125
|
}
|
|
80
|
126
|
}
|
|
81
|
127
|
}
|
|
82
|
128
|
</script>
|
|
83
|
129
|
|
|
84
|
130
|
<style lang="scss" scoped>
|
|
85
|
|
-.drawer-container {
|
|
86
|
|
- padding: 24px;
|
|
87
|
|
- font-size: 14px;
|
|
88
|
|
- line-height: 1.5;
|
|
89
|
|
- word-wrap: break-word;
|
|
90
|
|
-
|
|
91
|
|
- .drawer-title {
|
|
92
|
|
- margin-bottom: 12px;
|
|
93
|
|
- color: rgba(0, 0, 0, .85);
|
|
94
|
|
- font-size: 14px;
|
|
95
|
|
- line-height: 22px;
|
|
|
131
|
+ .setting-drawer-content {
|
|
|
132
|
+ .setting-drawer-title {
|
|
|
133
|
+ margin-bottom: 12px;
|
|
|
134
|
+ color: rgba(0, 0, 0, .85);
|
|
|
135
|
+ font-size: 14px;
|
|
|
136
|
+ line-height: 22px;
|
|
|
137
|
+ font-weight: bold;
|
|
|
138
|
+ }
|
|
|
139
|
+
|
|
|
140
|
+ .setting-drawer-block-checbox {
|
|
|
141
|
+ display: flex;
|
|
|
142
|
+ justify-content: flex-start;
|
|
|
143
|
+ align-items: center;
|
|
|
144
|
+ margin-top: 10px;
|
|
|
145
|
+ margin-bottom: 20px;
|
|
|
146
|
+
|
|
|
147
|
+ .setting-drawer-block-checbox-item {
|
|
|
148
|
+ position: relative;
|
|
|
149
|
+ margin-right: 16px;
|
|
|
150
|
+ border-radius: 2px;
|
|
|
151
|
+ cursor: pointer;
|
|
|
152
|
+
|
|
|
153
|
+ img {
|
|
|
154
|
+ width: 48px;
|
|
|
155
|
+ height: 48px;
|
|
|
156
|
+ }
|
|
|
157
|
+
|
|
|
158
|
+ .setting-drawer-block-checbox-selectIcon {
|
|
|
159
|
+ position: absolute;
|
|
|
160
|
+ top: 0;
|
|
|
161
|
+ right: 0;
|
|
|
162
|
+ width: 100%;
|
|
|
163
|
+ height: 100%;
|
|
|
164
|
+ padding-top: 15px;
|
|
|
165
|
+ padding-left: 24px;
|
|
|
166
|
+ color: #1890ff;
|
|
|
167
|
+ font-weight: 700;
|
|
|
168
|
+ font-size: 14px;
|
|
|
169
|
+ }
|
|
|
170
|
+ }
|
|
|
171
|
+ }
|
|
96
|
172
|
}
|
|
97
|
173
|
|
|
98
|
|
- .drawer-item {
|
|
99
|
|
- color: rgba(0, 0, 0, .65);
|
|
|
174
|
+ .drawer-container {
|
|
|
175
|
+ padding: 24px;
|
|
100
|
176
|
font-size: 14px;
|
|
101
|
|
- padding: 12px 0;
|
|
102
|
|
- }
|
|
|
177
|
+ line-height: 1.5;
|
|
|
178
|
+ word-wrap: break-word;
|
|
103
|
179
|
|
|
104
|
|
- .drawer-switch {
|
|
105
|
|
- float: right
|
|
|
180
|
+ .drawer-title {
|
|
|
181
|
+ margin-bottom: 12px;
|
|
|
182
|
+ color: rgba(0, 0, 0, .85);
|
|
|
183
|
+ font-size: 14px;
|
|
|
184
|
+ line-height: 22px;
|
|
|
185
|
+ }
|
|
|
186
|
+
|
|
|
187
|
+ .drawer-item {
|
|
|
188
|
+ color: rgba(0, 0, 0, .65);
|
|
|
189
|
+ font-size: 14px;
|
|
|
190
|
+ padding: 12px 0;
|
|
|
191
|
+ }
|
|
|
192
|
+
|
|
|
193
|
+ .drawer-switch {
|
|
|
194
|
+ float: right
|
|
|
195
|
+ }
|
|
106
|
196
|
}
|
|
107
|
|
-}
|
|
108
|
197
|
</style>
|