mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-17 01:30:44 +08:00
✨ 添加离线数量为0时自动清空在线筛选的功能
This commit is contained in:
parent
513a88d37e
commit
a0e066c04f
@ -89,6 +89,7 @@ import {
|
|||||||
onActivated,
|
onActivated,
|
||||||
onDeactivated,
|
onDeactivated,
|
||||||
nextTick,
|
nextTick,
|
||||||
|
watch,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
useStore,
|
useStore,
|
||||||
@ -200,6 +201,20 @@ const onlineOptions = computed(() => {
|
|||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 筛选离线时,离线数量变为0时,自动清空在线筛选
|
||||||
|
*/
|
||||||
|
watch(() => serverCount.value, () => {
|
||||||
|
if (filterFormData.value.online === '-1' && serverCount.value.offline === 0) {
|
||||||
|
filterFormData.value.online = '';
|
||||||
|
}
|
||||||
|
if (filterFormData.value.online === '1' && serverCount.value.online === 0) {
|
||||||
|
filterFormData.value.online = '';
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
immediate: true,
|
||||||
|
});
|
||||||
|
|
||||||
const listTypeOptions = computed(() => [{
|
const listTypeOptions = computed(() => [{
|
||||||
key: 'card',
|
key: 'card',
|
||||||
label: '卡片',
|
label: '卡片',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user