mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-19 18:49:36 +08:00
Compare commits
2 Commits
d99225eca7
...
d9ef0b9b84
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9ef0b9b84 | ||
|
|
b16fd1ac15 |
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nazhua",
|
"name": "nazhua",
|
||||||
"version": "0.6.2",
|
"version": "0.6.3",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -20,9 +20,9 @@
|
|||||||
>
|
>
|
||||||
<div class="left-box">
|
<div class="left-box">
|
||||||
<server-option-box
|
<server-option-box
|
||||||
v-if="showTag && tagOptions.length"
|
v-if="showTag && serverGroupOptions.length"
|
||||||
v-model="filterFormData.tag"
|
v-model="filterFormData.tag"
|
||||||
:options="tagOptions"
|
:options="serverGroupOptions"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-box">
|
<div class="right-box">
|
||||||
@ -158,13 +158,21 @@ const showTag = computed(() => {
|
|||||||
const serverList = computed(() => store.state.serverList);
|
const serverList = computed(() => store.state.serverList);
|
||||||
// 服务器总数
|
// 服务器总数
|
||||||
const serverCount = computed(() => store.state.serverCount);
|
const serverCount = computed(() => store.state.serverCount);
|
||||||
|
// 分组标签
|
||||||
const tagOptions = computed(() => store.state.serverGroup.map((i) => ({
|
const serverGroupOptions = computed(() => {
|
||||||
key: uuid(),
|
const options = [];
|
||||||
label: i.name,
|
store.state.serverGroup.forEach((i) => {
|
||||||
value: i.name,
|
if (i.servers && i.servers.length > 0) {
|
||||||
title: `${i.servers.length}台`,
|
options.push({
|
||||||
})));
|
key: uuid(),
|
||||||
|
label: i.name,
|
||||||
|
value: i.name,
|
||||||
|
title: `${i.servers.length}台`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return options;
|
||||||
|
});
|
||||||
|
|
||||||
const onlineOptions = computed(() => {
|
const onlineOptions = computed(() => {
|
||||||
if (serverCount.value?.total !== serverCount.value?.online) {
|
if (serverCount.value?.total !== serverCount.value?.online) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user