Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄媛媛
ElectricitySheep
Commits
8004ade9
Commit
8004ade9
authored
Aug 03, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
e21c0115
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
banner.vue
src/components/sallCenter/plugin/banner.vue
+28
-1
templateEdit.vue
src/components/sallCenter/templateEdit.vue
+3
-0
No files found.
src/components/sallCenter/plugin/banner.vue
View file @
8004ade9
...
...
@@ -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
;
}
}
},
...
...
src/components/sallCenter/templateEdit.vue
View file @
8004ade9
...
...
@@ -563,6 +563,9 @@
fill
:
1
,
//填充方式0-留白 1填充
height
:
450
,
//默认高度
banners
:
[],
//轮播图
radius
:
0
,
//圆角
topAndBottom
:
0
,
//上下边距
leftAndRight
:
0
//左右边距
}
}
this
.
dataList
.
push
(
banObj
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment