Browse Source

add air style

organize
刘嘉炜 3 years ago
parent
commit
736f74e921
  1. 30
      src/subpackage/device/pages/air_conditioner/detail/detail.vue

30
src/subpackage/device/pages/air_conditioner/detail/detail.vue

@ -38,8 +38,8 @@
<view class="acd-btn-ls"> <view class="acd-btn-ls">
<view class="abl-tit">模式</view> <view class="abl-tit">模式</view>
<view class="abl-ls"> <view class="abl-ls">
<view class="al-item" v-for="(e, i) in modelLs" :key="i" @click="operateBtn({ op: 'mode', ext: e.mode })">
<view class="ai-icon">
<view class="al-item" hover-class="acd-hover-active" v-for="(e, i) in modelLs" :key="i" @click="operateBtn({ op: 'mode', ext: e.mode })">
<view class="ai-icon" :class="[e.mode == pageInfo.mode? 'active': '']">
<image mode="aspectFit" :src="getIconPath(e.icon)"></image> <image mode="aspectFit" :src="getIconPath(e.icon)"></image>
</view> </view>
<view class="ai-txt">{{ e.name || '-' }}</view> <view class="ai-txt">{{ e.name || '-' }}</view>
@ -49,8 +49,8 @@
<view class="acd-btn-ls"> <view class="acd-btn-ls">
<view class="abl-tit">风速</view> <view class="abl-tit">风速</view>
<view class="abl-ls"> <view class="abl-ls">
<view class="al-item" v-for="(e, i) in airSpeedLs" :key="i" @click="operateBtn({ op: 'speed', ext: e.speed })">
<view class="ai-icon">
<view class="al-item" hover-class="acd-hover-active" v-for="(e, i) in airSpeedLs" :key="i" @click="operateBtn({ op: 'speed', ext: e.speed })">
<view class="ai-icon" :class="[e.speed == pageInfo.speed? 'active': '']">
<image mode="aspectFit" :src="getIconPath(e.icon)"></image> <image mode="aspectFit" :src="getIconPath(e.icon)"></image>
</view> </view>
<view class="ai-txt">{{ e.name || '-' }}</view> <view class="ai-txt">{{ e.name || '-' }}</view>
@ -72,7 +72,7 @@
<view class="acd-btn-ls"> <view class="acd-btn-ls">
<view class="abl-tit">允许使用按钮</view> <view class="abl-tit">允许使用按钮</view>
<view class="abl-ls"> <view class="abl-ls">
<view class="al-item" v-for="(e, i) in allowLs" :key="i" @click="operateBtn({ op: e.op })">
<view class="al-item" hover-class="acd-hover-active" v-for="(e, i) in allowLs" :key="i" @click="operateBtn({ op: e.op })">
<view class="ai-icon"> <view class="ai-icon">
<image mode="aspectFit" :src="getIconPath(e.icon)"></image> <image mode="aspectFit" :src="getIconPath(e.icon)"></image>
</view> </view>
@ -232,7 +232,7 @@ export default {
tempBtn: util.debounce(function(type){ tempBtn: util.debounce(function(type){
let { pageInfo } = this; let { pageInfo } = this;
let _num = pageInfo.temperature || 0; let _num = pageInfo.temperature || 0;
_num = type == 'add' ? _num++ : type == 'reduce' ? _num-- : _num;
_num = type == 'add' ? ++_num : type == 'reduce' ? --_num : _num;
this.operateReq({ data: this.getOperateData({ op: 'st', ext: _num }), isTip: false }); this.operateReq({ data: this.getOperateData({ op: 'st', ext: _num }), isTip: false });
}, 300, true), }, 300, true),
@ -432,17 +432,35 @@ export default {
&:not(:nth-child(5n)){ &:not(:nth-child(5n)){
margin-right: 20upx; margin-right: 20upx;
} }
&.acd-hover-active{
.ai-icon{
&::after{
position: absolute;
content: '';
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: rgba($color: #000000, $alpha: .3);
}
}
}
.ai-icon{ .ai-icon{
position: relative;
margin: 0 auto 14upx; margin: 0 auto 14upx;
width: 116upx; width: 116upx;
height: 116upx; height: 116upx;
border-radius: 10upx; border-radius: 10upx;
background-color: #fff; background-color: #fff;
overflow: hidden;
@include centerFlex(center); @include centerFlex(center);
>image{ >image{
width: 60upx; width: 60upx;
height: 60upx; height: 60upx;
} }
&.active{
border: 2upx solid $themeColor;
}
} }
.ai-txt{ .ai-txt{
text-align: center; text-align: center;

Loading…
Cancel
Save