Browse Source

修复偏冷展示左边为空

dev_230517
zhangzhiyi 1 year ago
parent
commit
8a9fa96a6e
  1. 44
      src/view/device-detail/mode/smart.vue

44
src/view/device-detail/mode/smart.vue

@ -19,8 +19,11 @@ @@ -19,8 +19,11 @@
<div class="illustrate">
<img src="@/assets/imgs/device-detail/smart-mode/illustrate@2x.png">
</div>
<div class="switch-btn" @click="changeSwitch()">
<img :src="getImgSrc(onOffImg)" alt="">
<div class="switch-btn-container">
<div class="switch-btn" @click="changeSwitch()">
<img :src="getImgSrc(onOffImg)" alt="">
</div>
<div class="btn-text">开关</div>
</div>
</div>
</div>
@ -132,7 +135,7 @@ const initSwiper = () => { @@ -132,7 +135,7 @@ const initSwiper = () => {
centeredSlides: true,
observer: true,
observeParents: true,
initialSlide: currentModeIndex === 0? 5: currentModeIndex, //
initialSlide: currentModeIndex, //
on: {
touchStart: () => {
},
@ -228,7 +231,7 @@ const changeSwitch = () => { @@ -228,7 +231,7 @@ const changeSwitch = () => {
width: 100%;
position: absolute;
left: 0;
bottom: 40px;
bottom: 70px;
display: flex;
align-items: center;
justify-content: space-between;
@ -245,19 +248,30 @@ const changeSwitch = () => { @@ -245,19 +248,30 @@ const changeSwitch = () => {
}
}
.switch-btn {
width: 110px;
height: 110px;
border-radius: 50%;
background: url('@/assets/imgs/device-detail/smart-mode/circle-bg@2x.png') no-repeat;
background-size: 100% 100%;
.switch-btn-container {
margin-right: 64px;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.switch-btn {
width: 110px;
height: 110px;
border-radius: 50%;
background: url('@/assets/imgs/device-detail/smart-mode/circle-bg@2x.png') no-repeat;
background-size: 100% 100%;
display: flex;
align-items: center;
justify-content: center;
img {
width: 56px;
img {
width: 56px;
}
}
.btn-text {
position: absolute;
color: #FFF;
font-size: 28px;
width: 100%;
text-align: center;
margin-top: 20px;
}
}
}

Loading…
Cancel
Save