Compare commits

...

3 Commits

Author SHA1 Message Date
hi2hi
51197a1c05 🚀 0.6.6 2025-04-20 16:56:22 +08:00
hi2hi
a0e066c04f 添加离线数量为0时自动清空在线筛选的功能 2025-04-20 15:35:26 +08:00
hi2hi
513a88d37e 🐛 修正boolean值被转为字符串后,识别失败 2025-04-20 15:31:03 +08:00
4 changed files with 20 additions and 12 deletions

View File

@ -1,6 +1,6 @@
{
"name": "nazhua",
"version": "0.6.5",
"version": "0.6.6",
"type": "module",
"scripts": {
"dev": "vite",

View File

@ -40,8 +40,6 @@ Nazhua提供了丰富的配置选项
## 🤝 赞助商
> 按服务商字母排序,不分先后
<table>
<tr>
<td align="center">
@ -51,13 +49,6 @@ Nazhua提供了丰富的配置选项
<br />
<strong>VMISS</strong>
</td>
<td align="center">
<a href="https://yxvm.com" target="_blank" title="YXVM提供香港、新加坡、日本的云服务器与物理服务器">
<img src="./.github/images/yxvm-logo.jpg" width="200px;" alt="YXVM"/>
</a>
<br />
<strong>YXVM</strong>
</td>
</tr>
</table>

View File

@ -244,9 +244,11 @@ const localData = {
refreshData: window.localStorage.getItem('nazhua_monitor_refresh_data'),
chartType: window.localStorage.getItem('nazhua_monitor_chart_type'),
};
localData.peakShaving = validate.isSet(localData.peakShaving) ? localData.peakShaving === 'true' : false;
localData.refreshData = validate.isSet(localData.refreshData) ? localData.refreshData === 'true' : true;
const peakShaving = validate.isSet(localData.peakShaving) ? ref(localData.peakShaving) : ref(false);
const refreshData = validate.isSet(localData.refreshData) ? ref(localData.refreshData) : ref(true);
const peakShaving = ref(localData.peakShaving);
const refreshData = ref(localData.refreshData);
const showCates = ref({});
const monitorData = ref([]);
const longPressTimer = ref(null);

View File

@ -89,6 +89,7 @@ import {
onActivated,
onDeactivated,
nextTick,
watch,
} from 'vue';
import {
useStore,
@ -200,6 +201,20 @@ const onlineOptions = computed(() => {
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(() => [{
key: 'card',
label: '卡片',