Commit 941a477b by 李伟康

commit 增加等会

1 parent 7c9a4e53
......@@ -129,7 +129,6 @@ export default {
},
methods: {
showDialog (index) {
console.log(index)
this.isShowDialog = true
this.currentIndex = index
}
......
......@@ -3,32 +3,52 @@
class="mask"
v-if="isShowDialog"
>
<div
class="dialog-wrap"
:style="{'background-image': `url(${backgroundImageList[currentIndex]})`}"
>
<div class="dialog-wrap">
<div
class="close"
@click="closeHandle"
>
<img src="@/assets/images/icon-close.png" />
</div>
<div class="dialog">
<div class="dialog-title">
{{titleList[currentIndex]}}
<div
class="close"
@click="closeHandle"
>
<img src="@/assets/images/icon-close.png" />
<div
:class="['dialog-content',modeName]"
:style="{'background-image': `url(${backgroundImageList[currentIndex]})`}"
>
<div class="dialog-title">
{{titleList[currentIndex]}}
</div>
</div>
</div>
<div class="left_arrow">
<div class="arrow_inner" @click="changeHandle(-1)">
<img src="@/assets/images/arrow_left.png" class="img" />
<img src="@/assets/images/arrow_circle.png" class="circle" />
<div class="left_arrow">
<div
class="arrow_inner"
@click="changeHandle(-1)"
>
<img
src="@/assets/images/arrow_left.png"
class="img"
/>
<img
src="@/assets/images/arrow_circle.png"
class="circle"
/>
</div>
</div>
<div class="right_arrow">
<div class="arrow_inner" @click="changeHandle(1)">
<img src="@/assets/images/arrow_right.png" class="img" />
<img src="@/assets/images/arrow_circle.png" class="circle" />
<div
class="arrow_inner"
@click="changeHandle(1)"
>
<img
src="@/assets/images/arrow_right.png"
class="img"
/>
<img
src="@/assets/images/arrow_circle.png"
class="circle"
/>
</div>
</div>
</div>
......@@ -55,17 +75,21 @@ export default {
},
data () {
return {
msg: ''
modeName: ''
}
},
methods: {
closeHandle () {
this.$emit('update:isShowDialog', false)
},
changeHandle(val){
const {currentIndex,backgroundImageList} = this
if((currentIndex == 0 && val == -1) || (currentIndex == backgroundImageList.length - 1 && val == 1)) return alert('无更多内容')
changeHandle (val) {
const { currentIndex, backgroundImageList } = this
if ((currentIndex == 0 && val == -1) || (currentIndex == backgroundImageList.length - 1 && val == 1)) return alert('无更多内容')
this.modeName = val == -1 ? 'to-left' : 'to-right'
this.$emit('update:currentIndex', currentIndex + val)
setTimeout(()=>{
this.modeName = ''
},300)
}
}
}
......@@ -100,110 +124,59 @@ export default {
z-index: 1;
left: 50%;
top: 50%;
background-repeat: no-repeat;
background-size: 100% 100%;
transform: translate(-50%, -50%);
border-radius: 5px;
padding: 0 3.67vw 3.9vh;
box-sizing: border-box;
.close {
width: 60px;
height: 60px;
position: absolute;
right: -31vw;
top: 0;
right: -103px;
top: 0.96vh;
cursor: pointer;
z-index: 3;
}
.dialog-title {
width: 13.19vw;
font-weight: 900;
font-size: 30px;
color: #19ecff;
// background-image: url('../../../assets/images/title-dialog.png');
// background-repeat: no-repeat;
// background-size: 100% 100%;
text-align: center;
margin: 0 auto;
position: relative;
line-height: 8.39vh;
}
.dialog-content {
flex-wrap: wrap;
justify-content: space-between;
margin-top: 3.5vh;
.axis {
width: 26.88vw;
height: 34.97vh;
margin-right: 1.25vw;
img {
height: 100%;
}
}
.content-top-title {
width: 10vw;
margin: 7px auto;
display: flex;
align-items: center;
height: 2.68vh;
.title-icon {
width: 21px;
height: 7px;
}
.title {
font-weight: 500;
font-size: 16px;
color: #ffffff;
margin: 0 auto;
height: 2.68vh;
line-height: 2.68vh;
}
.dialog {
width: 100%;
height: 100%;
overflow: hidden;
&-content {
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-size: 100% 100%;
}
.content-info {
font-weight: 400;
font-size: 14px;
color: #c0c8d4;
margin: 0 auto;
.dialog-title {
width: 13.19vw;
font-weight: 900;
font-size: 30px;
color: #19ecff;
text-align: center;
margin: 0 auto;
position: relative;
line-height: 8.39vh;
}
}
.content-top {
width: 25.14vw;
height: 27.93vh;
margin-bottom: 4.45vh;
.to-left {
animation: to-move 0.25s forwards;
}
.content-bottom {
width: 25.14vw;
height: 14.88vh;
font-weight: 400;
font-size: 14px;
color: #ffffff;
padding: 1.2vh 1.39vw;
box-sizing: border-box;
.title {
font-weight: 500;
font-size: 16px;
margin-bottom: 8px;
height: 2.68vh;
.to-right {
animation: to-move 0.25s forwards;
animation-direction: reverse;
}
@keyframes to-move {
0% {
transform: translateX(100%);
}
.info {
font-weight: 400;
font-size: 14px;
color: #c0c8d4;
100% {
transform: translateX(0);
}
}
.bg {
background: #001d43;
box-shadow: inset 0 0 20px 0 #003587;
border-radius: 4px;
}
}
.left_arrow,
.right_arrow {
position: absolute;
top: 0;
bottom: 0;
z-index: 10;
z-index: 2;
width: 100px;
.arrow_inner {
position: absolute;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!