Skip to content

Commit 1f626cb

Browse files
committed
Merge branch 'vue3' of github.com:JX3BOX/uc into vue3
2 parents 35ce7e1 + 7f70ea3 commit 1f626cb

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

src/views/dashboard/config.vue

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
<div class="m-dashboard m-dashboard-config">
33
<h2 class="u-title"><i class="el-icon-setting"></i> 全局设置</h2>
44
<el-form class="m-config-form" label-position="left" label-width="160px">
5+
<el-form-item label="主题颜色">
6+
<template #label>
7+
<span>主题颜色</span>
8+
<el-tooltip class="item" effect="dark" content="仅App有效" placement="top"
9+
><i class="el-icon-info"></i
10+
></el-tooltip>
11+
</template>
12+
<el-radio-group v-model="conf.theme" size="small">
13+
<el-radio-button value="light">浅色</el-radio-button>
14+
<el-radio-button value="dark">深色</el-radio-button>
15+
</el-radio-group>
16+
</el-form-item>
517
<el-form-item label="编辑器模式">
618
<el-radio-group v-model="conf.editor_mode" size="small">
719
<el-radio-button value="tinymce">可视化</el-radio-button>
@@ -169,6 +181,7 @@ export default {
169181
data: function () {
170182
return {
171183
conf: {
184+
theme: "light",
172185
cmt_email: 0,
173186
cmt_order: "DESC",
174187
editor_mode: "tinymce",
@@ -207,7 +220,10 @@ export default {
207220
methods: {
208221
loadData: function () {
209222
getUserConf().then((res) => {
210-
this.conf = res?.data?.data;
223+
this.conf = {
224+
...(res?.data?.data || {}),
225+
theme: res?.data?.data?.theme || "light",
226+
};
211227
212228
this.oldLang = this.conf.default_lang;
213229
});

0 commit comments

Comments
 (0)