Skip to content

Commit f80f21a

Browse files
committed
配置优化
1 parent afdfa31 commit f80f21a

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

src/assets/css/themes.styl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ $t3-base-color = #6e7786;
2020

2121
.theme3 {
2222
position: relative;
23-
width: 92%;
24-
background-color: #fff;
25-
margin: -50px auto 20px auto;
23+
background: #fff;
2624
padding: 10px 0;
2725
box-shadow: 5px 5px 10px 0 rgba(116, 116, 116, 0.6), -5px 5px 10px 0 rgba(116, 116, 116, 0.6);
2826
}

src/assets/json/page-config.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"pageConfig": {
33
"title": "云忆网络",
4-
"background": "#fff",
4+
"backgroundColor": "#fff",
55
"theme": null,
66
"countId": null
77
},
@@ -10,24 +10,24 @@
1010
"value": "theme1",
1111
"name": "主题1",
1212
"banner": "static/img/theme1.jpg",
13-
"background": "#4a9bed",
13+
"backgroundColor": "#4a9bed",
1414
"contentWidth": "100%",
1515
"borderRadius": false
1616
},
1717
{
1818
"value": "theme2",
1919
"name": "主题2",
2020
"banner": "static/img/theme2.jpg",
21-
"background": "#707988",
21+
"backgroundColor": "#707988",
2222
"contentWidth": "80%",
2323
"borderRadius": true
2424
},
2525
{
2626
"value": "theme3",
2727
"name": "主题3",
2828
"banner": "static/img/theme3.jpg",
29-
"background": "#ffffff",
30-
"contentWidth": "90%",
29+
"backgroundColor": "#ffffff",
30+
"margin": "-50px 20px 20px 20px",
3131
"borderRadius": true
3232
}
3333
]

src/components/page-config.vue

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<el-input v-model="pageData.config.title"></el-input>
88
</el-form-item>
99
<el-form-item label="页面背景色">
10-
<el-color-picker v-model="pageData.config.background"/>
10+
<el-color-picker v-model="pageData.config.backgroundColor" />
1111
</el-form-item>
1212
<el-form-item label="页面统计ID">
1313
<el-input type="number" v-model="pageData.config.countId"></el-input>
@@ -21,7 +21,7 @@
2121

2222
<el-collapse-item title="主题设置" name="theme" v-if="pageData.config.theme">
2323
<el-form-item label="图片上传">
24-
<ImgUpload :value.sync="pageData.config.theme.banner"/>
24+
<ImgUpload :value.sync="pageData.config.theme.banner" />
2525
</el-form-item>
2626
<el-form-item label="内容区域宽度" v-if="pageData.config.theme.hasOwnProperty('contentWidth')">
2727
<el-radio-group v-model="pageData.config.theme.contentWidth" size="mini">
@@ -34,6 +34,9 @@
3434
<el-form-item label="内容区域圆角" v-if="pageData.config.theme.hasOwnProperty('borderRadius')">
3535
<el-switch v-model="pageData.config.theme.borderRadius"></el-switch>
3636
</el-form-item>
37+
<el-form-item label="内容区域位置(上 右 下 左 、空格隔开)" v-if="pageData.config.theme.hasOwnProperty('margin')">
38+
<el-input v-model="pageData.config.theme.margin"></el-input>
39+
</el-form-item>
3740
</el-collapse-item>
3841
</el-collapse>
3942
</el-form>
@@ -66,7 +69,7 @@ export default {
6669
methods: {
6770
setTheme(val) {
6871
this.pageData.config.theme = this.themes.find(item => val === item.value);
69-
this.pageData.config.background = this.pageData.config.theme.background;
72+
this.pageData.config.backgroundColor = this.pageData.config.theme.backgroundColor;
7073
}
7174
}
7275
}

src/components/widget-form.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div class="widget-form-wrapper">
3-
<div class="widget-form-container" :style="{background:pageData.config.background}">
3+
<div class="widget-form-container" :style="{backgroundColor:pageData.config.backgroundColor}">
44
<img v-if="theme" :src="themeBanner" alt="banner" width="100%" @click="setConfigTab()">
5-
<widget-form-list list="formList" v-if="theme" :class="theme.value" :style="{width:theme.contentWidth,borderRadius:theme.borderRadius?'10px':'0'}"/>
5+
<widget-form-list list="formList" v-if="theme" :class="theme.value" :style="{width:theme.contentWidth,margin:theme.margin,borderRadius:theme.borderRadius?'10px':'0'}"/>
66
<widget-form-list list="list"/>
77
</div>
88
</div>

0 commit comments

Comments
 (0)