添加了风扇根据温度变化而变化

This commit is contained in:
shefengchun 2022-12-02 17:08:23 +08:00
parent 768fbf4541
commit a505f61dcd
1 changed files with 10 additions and 3 deletions

View File

@ -441,7 +441,8 @@
<q-item> <q-item>
<q-item-section avatar style="margin-right: 0px; padding-right: 0px"> <q-item-section avatar style="margin-right: 0px; padding-right: 0px">
<!-- <q-icon class="text-white rotate" name="img:svgs/fan.svg" /> --> <!-- <q-icon class="text-white rotate" name="img:svgs/fan.svg" /> -->
<q-icon class="text-white rotate" name="img:new_icon/fan.png" /> <!-- <q-icon class="text-white rotate" name="img:new_icon/fan.png" /> -->
<q-icon class="text-white" :style="{'animation':fan}" name="img:new_icon/fan.png" />
</q-item-section> </q-item-section>
<q-item-section style="margin-left: -25px"> <q-item-section style="margin-left: -25px">
{{ $store.state.fan_temp.toFixed(1) }} {{ $store.state.fan_temp.toFixed(1) }}
@ -568,7 +569,13 @@ export default defineComponent({
const plan_running = computed( const plan_running = computed(
() => $store.state.current_running_plan.trim() != "" () => $store.state.current_running_plan.trim() != ""
); );
const fan = computed(
() => {
let wendu:any=($store.state.fan_temp).toFixed(1)
let sulv:any=(1-(wendu/150))
return 'rotate '+sulv+'s linear infinite'
}
);
const checkRegistered = () => { const checkRegistered = () => {
if ( if (
GlobalData.getInstance().getCurrentClient()?.is_connected && GlobalData.getInstance().getCurrentClient()?.is_connected &&
@ -642,7 +649,7 @@ export default defineComponent({
window_rect_edit_dialog, window_rect_edit_dialog,
show_device_list, show_device_list,
power_flag, power_flag,
fan,
async backupDB() { async backupDB() {
let client = GlobalData.getInstance().getCurrentClient(); let client = GlobalData.getInstance().getCurrentClient();
if (client) { if (client) {