diff --git a/frontend/components/IpInfos.vue b/frontend/components/IpInfos.vue index 66a23944..d4075a95 100644 --- a/frontend/components/IpInfos.vue +++ b/frontend/components/IpInfos.vue @@ -528,7 +528,7 @@ watch(() => userPreferences.value.ipGeoSource, (newVal, oldVal) => { watch(IPArray, () => { - store.updateGlobalIpDataCards(IPArray.value); + store.updateAllIPs(IPArray.value); }); onMounted(() => { diff --git a/frontend/components/WebRtcTest.vue b/frontend/components/WebRtcTest.vue index f4e7f499..21574496 100644 --- a/frontend/components/WebRtcTest.vue +++ b/frontend/components/WebRtcTest.vue @@ -175,7 +175,7 @@ onMounted(() => { }); watch(IPArray, () => { - store.updateGlobalIpDataCards(IPArray.value); + store.updateAllIPs(IPArray.value); }, { deep: true }); defineExpose({ diff --git a/frontend/components/advanced-tools/GlobalLatencyTest.vue b/frontend/components/advanced-tools/GlobalLatencyTest.vue index 2e67ec76..a0ac3f99 100644 --- a/frontend/components/advanced-tools/GlobalLatencyTest.vue +++ b/frontend/components/advanced-tools/GlobalLatencyTest.vue @@ -105,7 +105,7 @@ const isDarkMode = computed(() => store.isDarkMode); const isMobile = computed(() => store.isMobile); const lang = computed(() => store.lang); let allIPs = computed(() => { - const _allIPs = store.Global_ipDataCards; + const _allIPs = store.allIPs; return _allIPs.filter(ip => ip && !ip.includes(' ')); }); diff --git a/frontend/components/advanced-tools/MtrTest.vue b/frontend/components/advanced-tools/MtrTest.vue index 011b9ecb..20ce15a1 100644 --- a/frontend/components/advanced-tools/MtrTest.vue +++ b/frontend/components/advanced-tools/MtrTest.vue @@ -92,7 +92,7 @@ const isDarkMode = computed(() => store.isDarkMode); const isMobile = computed(() => store.isMobile); const lang = computed(() => store.lang); let allIPs = computed(() => { - const _allIPs = store.Global_ipDataCards; + const _allIPs = store.allIPs; return _allIPs.filter(ip => ip && !ip.includes(' ')); }); diff --git a/frontend/components/advanced-tools/RuleTest.vue b/frontend/components/advanced-tools/RuleTest.vue index e13e0ed0..ea05f5e3 100644 --- a/frontend/components/advanced-tools/RuleTest.vue +++ b/frontend/components/advanced-tools/RuleTest.vue @@ -139,7 +139,7 @@ onMounted(() => { }); watch(IPArray, () => { - store.updateGlobalIpDataCards(IPArray.value); + store.updateAllIPs(IPArray.value); }, { deep: true }); diff --git a/frontend/store.js b/frontend/store.js index 80efe67c..d4f3762c 100644 --- a/frontend/store.js +++ b/frontend/store.js @@ -22,7 +22,7 @@ export const useMainStore = defineStore('main', { isDarkMode: false, isMobile: false, shouldRefreshEveryThing: false, - Global_ipDataCards: [], + allIPs: [], configs: {}, userPreferences: {}, alert: { @@ -70,9 +70,9 @@ export const useMainStore = defineStore('main', { this.alert = { alertToShow, alertStyle, alertMessage, alertTitle }; }, // 从不同的组件收集合并 IP 数据 - updateGlobalIpDataCards(payload) { - const uniqueIPs = new Set([...this.Global_ipDataCards, ...payload]); - this.Global_ipDataCards = Array.from(uniqueIPs); + updateAllIPs(payload) { + const uniqueIPs = new Set([...this.allIPs, ...payload]); + this.allIPs = Array.from(uniqueIPs); }, // 设置移动模式 setIsMobile(payload) {