Commit d428df9e authored by sxl's avatar sxl 💬

fix:【bug】:swiper联动

parent 7aa1b5c7
...@@ -4,9 +4,7 @@ ...@@ -4,9 +4,7 @@
<Header :activeIndex="4" /> <Header :activeIndex="4" />
<CommonDialog :show="dialogVisible" @close-dialog="handleCloseDialog" :omDemandName="omDemandName" /> <CommonDialog :show="dialogVisible" @close-dialog="handleCloseDialog" :omDemandName="omDemandName" />
<el-dialog :title="conDia.lifeCycleName" :visible.sync="showConfirmButton" width="30%" center> <el-dialog :title="conDia.lifeCycleName" :visible.sync="showConfirmButton" width="30%" center>
<span> <p style=" white-space: pre-wrap;margin-left: 80px;" v-html="conDia.intro"></p>
{{ conDia.intro }}
</span>
<div class="mt20"></div> <div class="mt20"></div>
<div> <div>
<el-form label-width="90px" :model="formDia" :rules="rules" ref="formDia" label-position="right"> <el-form label-width="90px" :model="formDia" :rules="rules" ref="formDia" label-position="right">
...@@ -45,8 +43,8 @@ ...@@ -45,8 +43,8 @@
transform: translate3d(0px, 0px, 0px); transform: translate3d(0px, 0px, 0px);
"> ">
<div class="swiper-slide" style="height: 435px; margin-bottom: 10px" v-for="item in lifeServiceList2" <div class="swiper-slide" style="height: 435px; margin-bottom: 10px" v-for="item in lifeServiceList2"
:key="item.lifeCycleId" @mouseenter="swiper2.autoplay.stop()" :key="item.lifeCycleId" @mouseenter="swiper2 && swiper2.autoplay.stop()"
@mouseleave="swiper2.autoplay.start()"> @mouseleave="swiper2 && swiper2.autoplay.start()">
<div style=" <div style="
overflow-y: scroll; overflow-y: scroll;
display: flex; display: flex;
...@@ -278,6 +276,9 @@ export default { ...@@ -278,6 +276,9 @@ export default {
showTip(item) { showTip(item) {
this.showConfirmButton = true; this.showConfirmButton = true;
this.conDia = item; this.conDia = item;
this.conDia.intro = this.conDia.intro.split('').join('<br/>')
console.log(item, 'item');
this.omDemandName = item.lifeCycleName; this.omDemandName = item.lifeCycleName;
this.formDia.omDemandName = item.lifeCycleName; this.formDia.omDemandName = item.lifeCycleName;
}, },
...@@ -300,13 +301,17 @@ export default { ...@@ -300,13 +301,17 @@ export default {
this.lifeServiceList2 = this.sortLifeServiceList(index, JSON.parse(JSON.stringify(this.lifeServiceList))); this.lifeServiceList2 = this.sortLifeServiceList(index, JSON.parse(JSON.stringify(this.lifeServiceList)));
// swiper2停止自动滚动 // swiper2停止自动滚动
this.swiper2.autoplay.stop(); if (this.swiper2) {
this.swiper2.autoplay.stop();
}
if (timer) { if (timer) {
clearTimeout(timer); clearTimeout(timer);
} }
timer = setTimeout(() => { timer = setTimeout(() => {
this.swiper2.autoplay.start(); if (this.swiper2) {
this.swiper2.autoplay.start();
}
}, 3000); }, 3000);
}, },
sortLifeServiceList(idx, arr) { sortLifeServiceList(idx, arr) {
......
This diff is collapsed.
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