From 5caca1a7018e2c23fcff2c2ec17c169ddfd00107 Mon Sep 17 00:00:00 2001 From: Marshu Date: Thu, 5 Jun 2025 23:38:39 +0800 Subject: [PATCH] Fix the warning and error --- src/components/GroupSortDropdown.vue | 12 ++++++------ src/components/PublicGroupList.vue | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/GroupSortDropdown.vue b/src/components/GroupSortDropdown.vue index 5ecf252e2..9e32b1794 100644 --- a/src/components/GroupSortDropdown.vue +++ b/src/components/GroupSortDropdown.vue @@ -253,9 +253,9 @@ export default { const groupId = this.getGroupIdentifier(); if (this.group.sortKey && this.group.sortDirection) { - query[ `sort_${ groupId }` ] = `${ this.group.sortKey }_${ this.group.sortDirection }`; + query[ `sort_${groupId}` ] = `${this.group.sortKey}_${this.group.sortDirection}`; } else { - delete query[ `sort_${ groupId }` ]; + delete query[ `sort_${groupId}` ]; } this.$router.push({ query }).catch(() => {}); @@ -318,8 +318,8 @@ export default { } else if (sortKey === "uptime") { // Sort by uptime const uptimeList = this.$root.uptimeList || {}; - const uptimeA = a.id ? parseFloat(uptimeList[ `${ a.id }_24` ]) || 0 : 0; - const uptimeB = b.id ? parseFloat(uptimeList[ `${ b.id }_24` ]) || 0 : 0; + const uptimeA = a.id ? parseFloat(uptimeList[ `${a.id}_24` ]) || 0 : 0; + const uptimeB = b.id ? parseFloat(uptimeList[ `${b.id}_24` ]) || 0 : 0; valueA = uptimeA; valueB = uptimeB; } else if (sortKey === "cert") { @@ -356,7 +356,7 @@ export default { return cleanName; } // Fallback to ID or index - return this.group.id ? `group${ this.group.id }` : `group${ this.groupIndex }`; + return this.group.id ? `group${this.group.id}` : `group${this.groupIndex}`; } } }; @@ -485,4 +485,4 @@ export default { align-items: center; margin-left: 10px; } - + diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue index 916d78f45..d6c5a0821 100644 --- a/src/components/PublicGroupList.vue +++ b/src/components/PublicGroupList.vue @@ -11,9 +11,9 @@

- - - + + +