Skip to content

Commit 8e7dffb

Browse files
committed
布局优化
1 parent 0f38e04 commit 8e7dffb

5 files changed

Lines changed: 22 additions & 14 deletions

File tree

‎src/assets/css/config.styl‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
height: 45px;
7171
line-height: 45px;
7272
display: inline-block;
73-
width: 145px;
7473
text-align: center;
7574
font-size: 14px;
7675
font-weight: 500;

‎src/assets/css/index.styl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $primary-background-color = #ecf5ff;
1818

1919
.form-edit-wrapper {
2020
display: flex !important;
21-
max-width: 1320px;
21+
max-width: calc(45vw + 720px);
2222
overflow: auto;
2323
flex: auto;
2424
}

‎src/assets/json/widget.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
"imgComponents": [{
154154
"type": "imgSlide",
155155
"name": "图片轮播",
156-
"value": [],
156+
"value": ["static/img/theme1.jpg","static/img/theme2.jpg","static/img/theme3.jpg"],
157157
"style": {
158158
"margin": "0px 0px 0px 0px",
159159
"height": 250

‎src/components/widget-form-list.vue‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,10 @@
108108
<!-- 图片轮播 -->
109109
<div class="wg-imgslide" v-if="item.type === 'imgSlide'">
110110
<div class="flex flex-center" :style="{margin:item.style.margin}">
111-
<el-carousel :interval="5000" arrow="never" :style="{width:'100%',height:item.style.height+'px'}">
112-
<el-carousel-item v-for="item in 4" :key="item">
113-
<span>{{ item }}</span>
111+
<el-carousel :interval="3000" arrow="never" :style="{width:'100%',height:item.style.height+'px'}">
112+
<el-carousel-item v-for="url in item.value" :key="url">
113+
<!-- <span>{{ url }}</span> -->
114+
<img :src="url" alt="banner" style="width:100%;height:100%">
114115
</el-carousel-item>
115116
</el-carousel>
116117
</div>

‎src/views/home.vue‎

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
<div class="home">
33
<Header/>
44
<el-container>
5-
<div class="form-edit-wrapper flex flex-auto">
6-
<el-aside>
5+
<div class="form-edit-wrapper flex">
6+
<el-aside style="min-width:300px;width:20vw">
77
<div class="components-list">
88
<div class="widget-cate">基础类组件</div>
9-
<draggable element="ul" :list="basicComponents" :options="{group:{ name:'widget', pull:'clone',put:false},sort:false, ghostClass: 'ghost'}">
9+
<draggable
10+
element="ul"
11+
:list="basicComponents"
12+
:options="{group:{ name:'widget', pull:'clone',put:false},sort:false, ghostClass: 'ghost'}"
13+
>
1014
<li class="form-edit-widget-label" v-for="(item, index) in basicComponents" :key="index">
1115
<a>{{item.name}}</a>
1216
</li>
@@ -18,7 +22,11 @@
1822
</li>
1923
</draggable>
2024
<div class="widget-cate">辅助类组件</div>
21-
<draggable element="ul" :list="assistComponents" :options="{group:{ name:'widget', pull:'clone',put:false},sort:false, ghostClass: 'ghost'}">
25+
<draggable
26+
element="ul"
27+
:list="assistComponents"
28+
:options="{group:{ name:'widget', pull:'clone',put:false},sort:false, ghostClass: 'ghost'}"
29+
>
2230
<li class="form-edit-widget-label" v-for="(item, index) in assistComponents" :key="index">
2331
<a>{{item.name}}</a>
2432
</li>
@@ -37,11 +45,11 @@
3745
</el-main>
3846
</el-container>
3947

40-
<el-aside class="widget-config-container">
48+
<el-aside class="widget-config-container" style="min-width:300px;width:25vw">
4149
<el-container>
42-
<el-header height="45px">
43-
<div class="config-tab" :class="{active: configTab=='widget'}" @click="handleConfigSelect('widget')">字段属性</div>
44-
<div class="config-tab" :class="{active: configTab=='page'}" @click="handleConfigSelect('page')">页面属性</div>
50+
<el-header height="45px" class="flex">
51+
<div class="config-tab flex-auto" :class="{active: configTab=='widget'}" @click="handleConfigSelect('widget')">字段属性</div>
52+
<div class="config-tab flex-auto" :class="{active: configTab=='page'}" @click="handleConfigSelect('page')">页面属性</div>
4553
</el-header>
4654
<el-main class="config-content">
4755
<widget-config v-show="configTab=='widget'"></widget-config>

0 commit comments

Comments
 (0)