Fix the warning and error

This commit is contained in:
Marshu 2025-04-20 21:52:55 +08:00
parent f18f0b1812
commit 7e9dc81999

View file

@ -206,12 +206,6 @@ export default {
// Initialize sort settings // Initialize sort settings
this.initializeSortSettings(); this.initializeSortSettings();
}, },
mounted() {
// Load sort settings from URL
this.loadSortSettingsFromURL();
// Listen for URL changes
window.addEventListener("popstate", this.handlePopState);
},
watch: { watch: {
// Watch for changes in heartbeat list, reapply sorting // Watch for changes in heartbeat list, reapply sorting
"$root.heartbeatList": { "$root.heartbeatList": {
@ -241,6 +235,12 @@ export default {
deep: true, deep: true,
}, },
}, },
mounted() {
// Load sort settings from URL
this.loadSortSettingsFromURL();
// Listen for URL changes
window.addEventListener("popstate", this.handlePopState);
},
beforeUnmount() { beforeUnmount() {
// Remove URL change listener // Remove URL change listener
window.removeEventListener("popstate", this.handlePopState); window.removeEventListener("popstate", this.handlePopState);