Commit 8004ade9 authored by zhengke's avatar zhengke

修改

parent e21c0115
......@@ -116,6 +116,9 @@
.banner-container .banner-img-cover{
background-size: cover;
}
.bannerTopRadis{
overflow:hidden;
}
</style>
<template>
<div :class="{'active':banData.isCked}">
......@@ -126,7 +129,8 @@
<el-button type="primary" icon="el-icon-arrow-down" v-if="index!=dataLeng-1" @click="resetSord(1)" style="right: -25px; top: 30px;"></el-button>
</div>
<div class="diy-component-preview">
<div class="banner-container" :style="{height:banData.data.height+'px'}">
<div class="banner-container bannerTopRadis" :style="{height:banData.data.height+'px',borderRadius:banData.data.radius+'px',
marginBottom:banData.data.topAndBottom+'px',marginTop:banData.data.topAndBottom+'px',marginLeft:banData.data.leftAndRight+'px',marginRight:banData.data.leftAndRight+'px'}">
<el-carousel :interval="3000" arrow="always" v-if="banData.data.style==1" :height="banData.data.height+'px'">
<el-carousel-item v-for="(item,index) in banData.data.banners" :key="index">
<div class="banner-img" :class="banData.data.fill==1?'banner-img-cover':'banner-img-contain'" :style="{backgroundImage:'url('+getIconLink(item.picUrl)+')'}"></div>
......@@ -198,6 +202,21 @@
</div>
<el-button size="small" @click="addBanner()">添加轮播图</el-button>
</el-form-item>
<el-form-item label="圆角">
<el-input type="number" size="small" v-model="banData.data.radius">
<template slot="append">px</template>
</el-input>
</el-form-item>
<el-form-item label="上下边距">
<el-input type="number" size="small" v-model="banData.data.topAndBottom" :min="0" @change="getminNum()">
<template slot="append">px</template>
</el-input>
</el-form-item>
<el-form-item label="左右边距">
<el-input type="number" size="small" v-model="banData.data.leftAndRight" :min="0" @change="getminNum()">
<template slot="append">px</template>
</el-input>
</el-form-item>
</el-form>
</div>
<el-dialog title="选择链接" :visible.sync="isShowLink" width="800px">
......@@ -305,6 +324,14 @@
});
this.isShowLunbo=false;
this.$refs.lunbo.toggleSelection();
},
getminNum(){
if(this.banData.data.topAndBottom==''){
this.banData.data.topAndBottom=0;
}
if(this.banData.data.leftAndRight==''){
this.banData.data.leftAndRight=0;
}
}
},
......
......@@ -563,6 +563,9 @@
fill: 1, //填充方式0-留白 1填充
height: 450, //默认高度
banners: [], //轮播图
radius:0, //圆角
topAndBottom:0, //上下边距
leftAndRight:0 //左右边距
}
}
this.dataList.push(banObj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment