Compare commits

...

2 Commits

Author SHA1 Message Date
hi2hi
d9ef0b9b84 0.6.3 2025-04-01 11:37:06 +08:00
hi2hi
b16fd1ac15 🐛 fix: 修正分组下不存在服务器时,servers对象不存在导致分组异常问题 2025-04-01 11:36:18 +08:00
2 changed files with 18 additions and 10 deletions

View File

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

View File

@ -20,9 +20,9 @@
>
<div class="left-box">
<server-option-box
v-if="showTag && tagOptions.length"
v-if="showTag && serverGroupOptions.length"
v-model="filterFormData.tag"
:options="tagOptions"
:options="serverGroupOptions"
/>
</div>
<div class="right-box">
@ -158,13 +158,21 @@ const showTag = computed(() => {
const serverList = computed(() => store.state.serverList);
//
const serverCount = computed(() => store.state.serverCount);
const tagOptions = computed(() => store.state.serverGroup.map((i) => ({
key: uuid(),
label: i.name,
value: i.name,
title: `${i.servers.length}`,
})));
//
const serverGroupOptions = computed(() => {
const options = [];
store.state.serverGroup.forEach((i) => {
if (i.servers && i.servers.length > 0) {
options.push({
key: uuid(),
label: i.name,
value: i.name,
title: `${i.servers.length}`,
});
}
});
return options;
});
const onlineOptions = computed(() => {
if (serverCount.value?.total !== serverCount.value?.online) {