|
@@ -1,26 +1,57 @@
|
|
|
<template>
|
|
|
<div class="more-box">
|
|
|
- <div class="light-more-top">
|
|
|
+ <div class="air-more-top">
|
|
|
<div class="left">
|
|
|
- <div class="light-box">
|
|
|
+ <div class="air-box">
|
|
|
<img
|
|
|
- :src="LampsStatus === '全部关闭' ? lampCloseIcon : lampOpenIcon"
|
|
|
alt=""
|
|
|
- :style="LampsStatus !== '全部关闭' ? { width: '58px', height: '62px' } : ''" />
|
|
|
+ :src="
|
|
|
+ parseImgUrl('taiguv1/envmonitor', airSwitchStatus.switchStatus ? 'active/air-con.svg' : 'air-con.svg')
|
|
|
+ " />
|
|
|
</div>
|
|
|
- <div class="light-name">{{ LampsStatus }}</div>
|
|
|
+ <div class="air-name">{{ airSwitchStatus.statusText }}</div>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <div class="control" :class="btnAllOpenActive ? 'active' : ''" @click="handleSwitch('allOpen')">全开</div>
|
|
|
- <div class="control" :class="btnAllCloseActive ? 'active' : ''" @click="handleSwitch('allClose')">全关</div>
|
|
|
+ <div class="control" :ref="setRef" @click="handleSwitch('isOpen', true)">全开</div>
|
|
|
+ <div class="control" :ref="setRef" @click="handleSwitch('isOpen', false)">全关</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="light-middle" v-if="LampsStatus !== '全部关闭'">
|
|
|
+ <div class="air-middle" v-if="airSwitchStatus.switchStatus">
|
|
|
<div class="bright-slider">
|
|
|
- <Slider v-model="allBrightValue" :isFollow="true" suffix="%" />
|
|
|
+ <Slider
|
|
|
+ v-model="airData.tempSet"
|
|
|
+ :min="airData.minTempSet"
|
|
|
+ :max="airData.maxTempSet"
|
|
|
+ isFollow
|
|
|
+ showValue
|
|
|
+ suffix="℃"
|
|
|
+ @onEnd="setAirStatus('tempSet')"></Slider>
|
|
|
</div>
|
|
|
<div class="temp-slider">
|
|
|
- <LampSlider v-model="allColorTempValue" />
|
|
|
+ <div class="handle-box">
|
|
|
+ <div class="handle-item air-down" :ref="setRef" @click.prevent.stop="handle('minus', airData, 'all')">
|
|
|
+ <img class="icon" :src="parseImgUrl('taiguv1/envmonitor', 'minus.svg')" />
|
|
|
+ </div>
|
|
|
+ <div class="handle-item air-up" :ref="setRef" @click.prevent.stop="handle('plus', airData, 'all')">
|
|
|
+ <img class="icon" :src="parseImgUrl('taiguv1/envmonitor', 'plus.svg')" />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="handle-item air-auto"
|
|
|
+ :class="airData.isAutoGear ? 'active' : ''"
|
|
|
+ @click.prevent.stop="handle('auto', airData, 'all')">
|
|
|
+ A
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="fan-speed">
|
|
|
+ <div class="volume-top">
|
|
|
+ <span :class="airData.gear == 0 ? 'span-active' : ''">0</span>
|
|
|
+ <span :class="airData.gear == 1 ? 'span-active' : ''">1</span>
|
|
|
+ <span :class="airData.gear == 2 ? 'span-active' : ''">2</span>
|
|
|
+ <span :class="airData.gear == 3 ? 'span-active' : ''">3</span>
|
|
|
+ </div>
|
|
|
+ <div class="text">风量调节</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -28,183 +59,282 @@
|
|
|
<img src="@/assets/svg/line.svg" alt="" />
|
|
|
</div>
|
|
|
|
|
|
- <div class="light-bottom">
|
|
|
- <div class="item-box" :class="item.valueSwitch ? 'light-box-active ' : ''" v-for="(item, index) in childLights">
|
|
|
- <div class="name">{{ item.name }}</div>
|
|
|
- <!-- <Switch
|
|
|
- class="switch-btn"
|
|
|
- inactive-color="rgba(0, 0, 0, 0.08)"
|
|
|
- v-model="item.valueSwitch"
|
|
|
- @click="handleChildLight(item)"
|
|
|
- /> -->
|
|
|
- <SwitchButton v-model="item.valueSwitch" @change="handleChildLight(item)" />
|
|
|
+ <div class="air-bottom">
|
|
|
+ <div class="item-box" v-for="item in airEquipList" :key="item.id">
|
|
|
+ <div class="handle-top">
|
|
|
+ <div class="switch-box">
|
|
|
+ <div class="name">{{ item.localName }}</div>
|
|
|
+ <div class="switch">
|
|
|
+ <SwitchButton
|
|
|
+ :loading="allAirStatus[item.id]?.loading"
|
|
|
+ v-model="item.isOpen"
|
|
|
+ @change="sigleAirChange('isOpen', item, 'single')" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="fan-speed air-card">
|
|
|
+ <div class="handle-box">
|
|
|
+ <div class="handle-item air-down" :ref="setRef" @click.prevent.stop="handle('minus', item, 'single')">
|
|
|
+ <img class="icon" :src="parseImgUrl('taiguv1/envmonitor', 'minus.svg')" />
|
|
|
+ </div>
|
|
|
+ <div class="handle-item air-up" :ref="setRef" @click.prevent.stop="handle('plus', item, 'single')">
|
|
|
+ <img class="icon" :src="parseImgUrl('taiguv1/envmonitor', 'plus.svg')" />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="handle-item air-auto"
|
|
|
+ :class="item.isAutoGear ? 'active' : ''"
|
|
|
+ @click.prevent.stop="handle('auto', item, 'single')">
|
|
|
+ A
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="fans-view">
|
|
|
+ <div class="volume-top">
|
|
|
+ <span :class="item.gear == 0 ? 'span-active' : ''">0</span>
|
|
|
+ <span :class="item.gear == 1 ? 'span-active' : ''">1</span>
|
|
|
+ <span :class="item.gear == 2 ? 'span-active' : ''">2</span>
|
|
|
+ <span :class="item.gear == 3 ? 'span-active' : ''">3</span>
|
|
|
+ </div>
|
|
|
+ <div class="text">风量调节</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="handle-bottom">
|
|
|
+ <Slider
|
|
|
+ isFollow
|
|
|
+ showValue
|
|
|
+ suffix="℃"
|
|
|
+ v-model="item.tempSet"
|
|
|
+ :min="airData.minTempSet"
|
|
|
+ :max="airData.maxTempSet"
|
|
|
+ @onEnd="sigleAirChange('tempSet', item, 'single')"></Slider>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import lampCloseIcon from '@/assets/taiguv1/svg/lamp_close_icon.svg'
|
|
|
-import lampOpenIcon from '@/assets/taiguv1/svg/lamp_open_p_icon.svg'
|
|
|
-import LampSlider from '@/components/lamp-slider/LampSlider.vue'
|
|
|
import Slider from '@/components/slider/Slider.vue'
|
|
|
import SwitchButton from '@/components/switch-button/SwitchButton.vue'
|
|
|
-import { onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
|
|
-
|
|
|
-const allBrightValue = ref(0)
|
|
|
-const allColorTempValue = ref(50)
|
|
|
-const btnAllCloseActive = ref(false)
|
|
|
-const btnAllOpenActive = ref(false)
|
|
|
-
|
|
|
-const emit = defineEmits(['statusChange'])
|
|
|
-const LampsStatus = ref('全部关闭')
|
|
|
-
|
|
|
-const childLights = ref([])
|
|
|
-
|
|
|
-const isHandlingSwitchOperation = ref(false)
|
|
|
-
|
|
|
+import { computed, onBeforeUnmount, onMounted, ref, watch, nextTick, onUnmounted } from 'vue'
|
|
|
+import { parseImgUrl } from '@/utils'
|
|
|
+import { useStore } from '@/store'
|
|
|
+import useDeviceControl from '@/hooks/useDeviceControl'
|
|
|
+const emit = defineEmits(['getStatus'])
|
|
|
+const controlBtn = ref([])
|
|
|
+const store = useStore()
|
|
|
+const setRef = el => {
|
|
|
+ if (el) {
|
|
|
+ if (!controlBtn.value.includes(el)) {
|
|
|
+ controlBtn.value.push(el)
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+const deviceControl = useDeviceControl()
|
|
|
// 接收父组件传递的初始状态
|
|
|
const props = defineProps({
|
|
|
- initialStatus: {
|
|
|
- type: Boolean,
|
|
|
- default: false
|
|
|
- },
|
|
|
- currentLamps: {
|
|
|
+ airList: {
|
|
|
type: Array,
|
|
|
default: () => []
|
|
|
+ },
|
|
|
+ status: {
|
|
|
+ type: Object,
|
|
|
+ default: function () {
|
|
|
+ return {
|
|
|
+ isOpen: false,
|
|
|
+ gear: 1,
|
|
|
+ minTempSet: 16,
|
|
|
+ maxTempSet: 32,
|
|
|
+ tempSet: 24,
|
|
|
+ isAutoGear: false,
|
|
|
+ switchLoading: false
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
-const checkLampsStatus = () => {
|
|
|
- const allOpen = childLights.value.every(item => item.valueSwitch)
|
|
|
- const allClose = childLights.value.every(item => !item.valueSwitch)
|
|
|
- if (allOpen) {
|
|
|
- LampsStatus.value = '全部开启'
|
|
|
- emit('statusChange', true, LampsStatus.value)
|
|
|
- return
|
|
|
- }
|
|
|
- if (allClose) {
|
|
|
- LampsStatus.value = '全部关闭'
|
|
|
- emit('statusChange', false, LampsStatus.value)
|
|
|
- return
|
|
|
+const airEquipList = ref([])
|
|
|
+const airData = ref(props.status)
|
|
|
+const airSwitchStatus = computed(() => {
|
|
|
+ let statusText = ''
|
|
|
+ let switchStatus = false
|
|
|
+ let arr = props.airList.filter(item => item.runStatus == 1)
|
|
|
+ if (arr.length == 0) {
|
|
|
+ statusText = '全部关闭'
|
|
|
+ switchStatus = false
|
|
|
+ } else {
|
|
|
+ statusText = arr.length > 0 && arr.length < props.airList.length ? '部分开启' : '全部开启'
|
|
|
+ switchStatus = true
|
|
|
}
|
|
|
- LampsStatus.value = '部分开启'
|
|
|
- emit('statusChange', true, LampsStatus.value)
|
|
|
-}
|
|
|
-
|
|
|
-let timer = null
|
|
|
-const handleSwitch = type => {
|
|
|
- if (timer) {
|
|
|
- clearTimeout(timer)
|
|
|
+ return {
|
|
|
+ statusText,
|
|
|
+ switchStatus
|
|
|
}
|
|
|
- isHandlingSwitchOperation.value = true
|
|
|
+})
|
|
|
+const allAirStatus = computed(() => store.state.taiguv1.airSwtichStatus)
|
|
|
|
|
|
- if (type === 'allOpen') {
|
|
|
- childLights.value.forEach(item => {
|
|
|
- item.valueSwitch = true
|
|
|
- })
|
|
|
- btnAllOpenActive.value = true
|
|
|
- btnAllCloseActive.value = false
|
|
|
- } else {
|
|
|
- childLights.value.forEach(item => {
|
|
|
- item.valueSwitch = false
|
|
|
- })
|
|
|
- btnAllOpenActive.value = false
|
|
|
- btnAllCloseActive.value = true
|
|
|
- }
|
|
|
- timer = setTimeout(() => {
|
|
|
- btnAllOpenActive.value = false
|
|
|
- btnAllCloseActive.value = false
|
|
|
- }, 100)
|
|
|
- checkLampsStatus()
|
|
|
+watch(
|
|
|
+ () => props.status,
|
|
|
+ (newVal, oldVal) => {
|
|
|
+ if (!newVal) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let { minTempSet, maxTempSet } = airData.value
|
|
|
+ airData.value = { ...newVal, minTempSet, maxTempSet }
|
|
|
+ },
|
|
|
+ { deep: true } // 添加深度监听
|
|
|
+)
|
|
|
+watch(
|
|
|
+ () => props.airList,
|
|
|
+ (newVal, oldVal) => {
|
|
|
+ compareStatus(newVal)
|
|
|
+ },
|
|
|
+ { deep: true }
|
|
|
+)
|
|
|
|
|
|
- const commands = []
|
|
|
- childLights.value.forEach(item => {
|
|
|
- const objName = {
|
|
|
- id: item.id,
|
|
|
- code: item.codeSwitch,
|
|
|
- value: item.valueSwitch ? 1 : 0
|
|
|
+// 对比和store中开关状态
|
|
|
+const compareStatus = data => {
|
|
|
+ console.log(airEquipList.value, 'airEquipList.value')
|
|
|
+ airEquipList.value = data.map(item => {
|
|
|
+ if (allAirStatus.value[item.id]) {
|
|
|
+ if (allAirStatus.value[item.id].lastSwitchStatus == item.runStatus) {
|
|
|
+ store.dispatch('taiguv1/setAirStatus', {
|
|
|
+ id: item.id,
|
|
|
+ status: {
|
|
|
+ loading: false,
|
|
|
+ lastSwitchStatus: item.runStatus == 1
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ isOpen: item.runStatus == 1
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ isOpen: allAirStatus.value[item.id].lastSwitchStatus
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ isOpen: item.runStatus == 1
|
|
|
+ }
|
|
|
}
|
|
|
- commands.push(objName)
|
|
|
})
|
|
|
- // httpSetEnv(commands);
|
|
|
+}
|
|
|
|
|
|
- setTimeout(() => {
|
|
|
- isHandlingSwitchOperation.value = false
|
|
|
- }, 0)
|
|
|
+// 整体开关
|
|
|
+const handleSwitch = (type, value) => {
|
|
|
+ airData.value.isOpen = value
|
|
|
+ setAirStatus(type)
|
|
|
}
|
|
|
|
|
|
-const handleChildLight = itemCurrent => {
|
|
|
- childLights.value.forEach(item => {
|
|
|
- if (item.id === itemCurrent.id) {
|
|
|
- item.valueSwitch = itemCurrent.valueSwitch
|
|
|
- }
|
|
|
- })
|
|
|
- checkLampsStatus()
|
|
|
- const objName = {
|
|
|
- id: itemCurrent.id,
|
|
|
- code: itemCurrent.codeSwitch,
|
|
|
- value: itemCurrent.valueSwitch ? 1 : 0
|
|
|
+// 单个空调开关
|
|
|
+const sigleAirChange = (type, source, all) => {
|
|
|
+ console.log(source, 11111)
|
|
|
+ if (type == 'isOpen') {
|
|
|
+ store.dispatch('taiguv1/setAirStatus', {
|
|
|
+ id: source.id,
|
|
|
+ status: {
|
|
|
+ loading: true,
|
|
|
+ lastSwitchStatus: source.isOpen
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (all == 'single') {
|
|
|
+ const params = deviceControl.assemblyAirCommand(source[type], type, source)
|
|
|
+ deviceControl.sendCommands(params)
|
|
|
}
|
|
|
- const commands = [objName]
|
|
|
- // httpSetEnv(commands);
|
|
|
}
|
|
|
-
|
|
|
-// 添加 watch 来监听 currentLamps 的变化
|
|
|
-watch(
|
|
|
- () => props.currentLamps,
|
|
|
- newVal => {
|
|
|
- if (newVal && newVal.length > 0) {
|
|
|
- childLights.value = JSON.parse(JSON.stringify(newVal))
|
|
|
- // 场景切换了,需要设置环境
|
|
|
- // setEnvMmode()
|
|
|
- }
|
|
|
- },
|
|
|
- { immediate: true } // 确保组件初始化时执行
|
|
|
-)
|
|
|
-
|
|
|
-// 修改 watch,添加 immediate 属性以确保初始状态同步
|
|
|
-watch(
|
|
|
- () => props.initialStatus,
|
|
|
- newVal => {
|
|
|
- if (LampsStatus.value === '部分开启' || isHandlingSwitchOperation.value) {
|
|
|
- return
|
|
|
+const setAirStatus = type => {
|
|
|
+ if (type == 'isOpen') {
|
|
|
+ store.dispatch('taiguv1/setAirStatus', {
|
|
|
+ id: 'all',
|
|
|
+ status: {
|
|
|
+ loading: true,
|
|
|
+ lastSwitchStatus: airData.value.isOpen
|
|
|
+ }
|
|
|
+ })
|
|
|
+ airEquipList.value.forEach(item => {
|
|
|
+ item.isOpen = airData.value.isOpen
|
|
|
+ sigleAirChange(type, item, 'all')
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const params = deviceControl.assemblyAirCommand(airData.value[type], type, airEquipList.value)
|
|
|
+ deviceControl.sendCommands(params)
|
|
|
+}
|
|
|
+const handle = (type, data, all) => {
|
|
|
+ console.log('debugger')
|
|
|
+ if (!data.gear) data.gear = 0
|
|
|
+ if (type === 'minus') {
|
|
|
+ data.gear -= 1
|
|
|
+ if (data.gear < 0) {
|
|
|
+ data.gear = 0
|
|
|
}
|
|
|
- if (newVal) {
|
|
|
- handleSwitch('allOpen')
|
|
|
- } else {
|
|
|
- handleSwitch('allClose')
|
|
|
+ data.isAutoGear = false
|
|
|
+ } else if (type === 'plus') {
|
|
|
+ data.gear += 1
|
|
|
+ if (data.gear > 3) {
|
|
|
+ data.gear = 3
|
|
|
}
|
|
|
- },
|
|
|
- { immediate: true }
|
|
|
-)
|
|
|
+ data.isAutoGear = false
|
|
|
+ } else if (type === 'auto') {
|
|
|
+ data.isAutoGear = true
|
|
|
+ }
|
|
|
+ if (all == 'all') {
|
|
|
+ setAirStatus('gear', all)
|
|
|
+ } else {
|
|
|
+ sigleAirChange('gear', data, all)
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
-onBeforeUnmount(() => {})
|
|
|
-onMounted(() => {})
|
|
|
+onMounted(() => {
|
|
|
+ nextTick(() => {
|
|
|
+ controlBtn.value.forEach(button => {
|
|
|
+ button.addEventListener('touchstart', handleTouchStart)
|
|
|
+ })
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+// 添加 touchstart 处理函数
|
|
|
+const handleTouchStart = event => {
|
|
|
+ const button = event.currentTarget
|
|
|
+ button.classList.add('active')
|
|
|
+ setTimeout(() => {
|
|
|
+ button.classList.remove('active')
|
|
|
+ }, 200)
|
|
|
+}
|
|
|
+// 添加 onUnmounted 钩子
|
|
|
+onUnmounted(() => {
|
|
|
+ controlBtn.value.forEach(button => {
|
|
|
+ button.removeEventListener('touchstart', handleTouchStart)
|
|
|
+ })
|
|
|
+})
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.more-box {
|
|
|
- .light-more-top {
|
|
|
+ .air-more-top {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
margin-bottom: 36px;
|
|
|
.left {
|
|
|
margin-right: 36px;
|
|
|
- .light-box {
|
|
|
+ .air-box {
|
|
|
width: 110px;
|
|
|
height: 110px;
|
|
|
background: rgba(255, 255, 255, 0.4);
|
|
|
border-radius: 50%;
|
|
|
text-align: center;
|
|
|
margin-right: 27px;
|
|
|
+ display: flex;
|
|
|
+ justify-self: center;
|
|
|
+ align-items: center;
|
|
|
img {
|
|
|
- width: 36px;
|
|
|
- height: 36px;
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
margin: 0 auto;
|
|
|
- margin-top: 37px;
|
|
|
}
|
|
|
}
|
|
|
- .light-name {
|
|
|
+ .air-name {
|
|
|
//styleName: Chi/Body Large;
|
|
|
margin-top: 12px;
|
|
|
font-family: PingFang SC;
|
|
@@ -245,7 +375,7 @@ onMounted(() => {})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .light-middle {
|
|
|
+ .air-middle {
|
|
|
// height: 100px;
|
|
|
// background: #fff;
|
|
|
.bright-slider {
|
|
@@ -257,46 +387,191 @@ onMounted(() => {})
|
|
|
border-radius: 12px;
|
|
|
}
|
|
|
.temp-slider {
|
|
|
- width: 100%;
|
|
|
- height: 58px;
|
|
|
- padding: 2px;
|
|
|
- border-radius: 12px;
|
|
|
- background: var(--White-White-60, rgba(255, 255, 255, 0.6));
|
|
|
- margin-bottom: 12px;
|
|
|
+ display: flex;
|
|
|
+ width: 296px;
|
|
|
+ height: 65px;
|
|
|
+ padding: 0px 24px;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ flex-shrink: 0;
|
|
|
+ border-radius: 24px 24px 60px 24px;
|
|
|
+ background: rgba(255, 255, 255, 0.6);
|
|
|
+ .handle-box {
|
|
|
+ display: flex;
|
|
|
+ .handle-item {
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ background: rgba(255, 255, 255, 0.4);
|
|
|
+ // backdrop-filter: blur(15px);
|
|
|
+ border-radius: 50%;
|
|
|
+ text-align: center;
|
|
|
+ .icon {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+ &:nth-child(3) {
|
|
|
+ font-family: Jost;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 300;
|
|
|
+ line-height: 36px;
|
|
|
+ text-align: center;
|
|
|
+ color: rgba(0, 20, 40, 1);
|
|
|
+ }
|
|
|
+ &.active {
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0px 10px 20px 0px rgba(0, 20, 40, 0.1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .fan-speed {
|
|
|
+ .volume-top {
|
|
|
+ padding-bottom: 2px;
|
|
|
+ height: 3.33vh;
|
|
|
+ line-height: 1;
|
|
|
+ span {
|
|
|
+ //styleName: En/Body Small;
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 5px;
|
|
|
+ font-family: Jost;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 17px;
|
|
|
+ color: rgba(116, 128, 141, 1);
|
|
|
+ }
|
|
|
+ .span-active {
|
|
|
+ color: rgba(0, 20, 40, 1);
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .text {
|
|
|
+ //styleName: Chi/Body XS;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-size: 11px;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 15px;
|
|
|
+ letter-spacing: 0.02em;
|
|
|
+ color: rgba(0, 20, 40, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .fan-speed {
|
|
|
+ &.air-card {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ }
|
|
|
+ .volume-top {
|
|
|
+ padding-bottom: 2px;
|
|
|
+ height: 3.33vh;
|
|
|
+ line-height: 1;
|
|
|
+ span {
|
|
|
+ //styleName: En/Body Small;
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 5px;
|
|
|
+ font-family: Jost;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 17px;
|
|
|
+ color: rgba(116, 128, 141, 1);
|
|
|
+ }
|
|
|
+ .span-active {
|
|
|
+ color: rgba(0, 20, 40, 1);
|
|
|
+ font-size: 16px;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .text {
|
|
|
+ //styleName: Chi/Body XS;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-size: 11px;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 15px;
|
|
|
+ letter-spacing: 0.02em;
|
|
|
+ color: rgba(0, 20, 40, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .handle-box {
|
|
|
+ display: flex;
|
|
|
+ gap: 6px;
|
|
|
+ .handle-item {
|
|
|
+ width: 36px;
|
|
|
+ height: 36px;
|
|
|
+ background: rgba(255, 255, 255, 0.4);
|
|
|
+ // backdrop-filter: blur(15px);
|
|
|
+ border-radius: 50%;
|
|
|
+ text-align: center;
|
|
|
+ .icon {
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+ &:nth-child(3) {
|
|
|
+ font-family: Jost;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 300;
|
|
|
+ line-height: 36px;
|
|
|
+ text-align: center;
|
|
|
+ color: rgba(0, 20, 40, 1);
|
|
|
+ }
|
|
|
+ &.active {
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0px 10px 20px 0px rgba(0, 20, 40, 0.1);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.divider {
|
|
|
height: 24px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- margin-bottom: 12px;
|
|
|
}
|
|
|
- .light-bottom {
|
|
|
+ .air-bottom {
|
|
|
// margin-top: 36px;
|
|
|
.item-box {
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: center;
|
|
|
width: 300px;
|
|
|
- height: 68px;
|
|
|
- box-sizing: border-box;
|
|
|
padding: 20px 24px;
|
|
|
- border-radius: 24px 24px 44px 24px;
|
|
|
- background: rgba(255, 255, 255, 0.2);
|
|
|
- box-shadow: 0px 10px 20px 0px rgba(0, 20, 40, 0.05);
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ gap: 12px;
|
|
|
margin-bottom: 12px;
|
|
|
- .name {
|
|
|
- //styleName: Chi/Body Regular;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-size: 14px;
|
|
|
- font-weight: 400;
|
|
|
- line-height: 19px;
|
|
|
- letter-spacing: 0.02em;
|
|
|
- color: rgba(0, 20, 40, 1);
|
|
|
- }
|
|
|
- }
|
|
|
- .light-box-active {
|
|
|
+ border-radius: 24px 24px 60px 24px;
|
|
|
background: rgba(255, 255, 255, 0.6);
|
|
|
+ .handle-top {
|
|
|
+ width: 100%;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ .switch-box {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ height: 28px;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ .name {
|
|
|
+ color: var(--Blue, #001428);
|
|
|
+ font-family: 'PingFang SC';
|
|
|
+ font-size: 18px;
|
|
|
+ font-style: normal;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: normal;
|
|
|
+ letter-spacing: 0.36px;
|
|
|
+ }
|
|
|
+ .switch {
|
|
|
+ width: 50px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .handle-bottom {
|
|
|
+ display: flex;
|
|
|
+ width: 243px;
|
|
|
+ height: 48px;
|
|
|
+ padding: 2px;
|
|
|
+ align-items: center;
|
|
|
+ gap: 10px;
|
|
|
+ border-radius: 14px;
|
|
|
+ background: var(--White-White-60, rgba(255, 255, 255, 0.6));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.switch-btn {
|
|
@@ -308,21 +583,21 @@ onMounted(() => {})
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="scss">
|
|
|
-.more-box {
|
|
|
- .van-loading__spinner {
|
|
|
- color: $elActiveColor !important;
|
|
|
- }
|
|
|
+// .more-box {
|
|
|
+// .van-loading__spinner {
|
|
|
+// color: $elActiveColor !important;
|
|
|
+// }
|
|
|
|
|
|
- .van-switch__loading {
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- line-height: 1;
|
|
|
- }
|
|
|
+// .van-switch__loading {
|
|
|
+// top: 0;
|
|
|
+// left: 0;
|
|
|
+// width: 100%;
|
|
|
+// height: 100%;
|
|
|
+// line-height: 1;
|
|
|
+// }
|
|
|
|
|
|
- .van-switch--disabled {
|
|
|
- opacity: 0.5;
|
|
|
- }
|
|
|
-}
|
|
|
+// .van-switch--disabled {
|
|
|
+// opacity: 0.5;
|
|
|
+// }
|
|
|
+// }
|
|
|
</style>
|