Browse Source

修复偏冷展示左边为空

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

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

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