diff --git a/package.json b/package.json index dca5d6bb..7c86d710 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moviepilot", - "version": "1.9.8", + "version": "1.9.8-1", "private": true, "bin": "dist/service.js", "scripts": { diff --git a/src/components/dialog/ReorganizeDialog.vue b/src/components/dialog/ReorganizeDialog.vue index 3574d78b..89f17018 100644 --- a/src/components/dialog/ReorganizeDialog.vue +++ b/src/components/dialog/ReorganizeDialog.vue @@ -350,7 +350,7 @@ onMounted(() => { - + , // 刷新状态 refreshStatus: Boolean, + // 是否允许刷新数据 + allowRefresh: { + type: Boolean, + default: true, + }, }) const emit = defineEmits(['update:refreshStatus']) @@ -32,10 +38,10 @@ onUnmounted(() => { - - - - + + + + diff --git a/src/pages/dashboard.vue b/src/pages/dashboard.vue index 577c7d62..3683bd77 100644 --- a/src/pages/dashboard.vue +++ b/src/pages/dashboard.vue @@ -19,6 +19,9 @@ const superUser = store.state.auth.superUser // 是否拉升高度 const isElevated = ref(true) +// 是否发送请求的总开关 +const isRequest = ref(true) + // 计算属性,控制是否拉升高度 const elevatedConf = controlledComputed( () => isElevated.value, @@ -269,7 +272,8 @@ async function getPluginDashboard(id: string, key: string) { if ( res.attrs?.refresh && pluginDashboardRefreshStatus.value[pluginDashboardId] && - enableConfig.value[pluginDashboardId] + enableConfig.value[pluginDashboardId] && + isRequest.value ) { // 清除之前的定时器 if (refreshTimers.value[pluginDashboardId]) { @@ -298,6 +302,14 @@ onBeforeMount(async () => { await loadDashboardConfig() getPluginDashboardMeta() }) + +onActivated(async () => { + isRequest.value = true +}) + +onDeactivated(() => { + isRequest.value = false +})