From 860cbc36fda94de327ddf9db505c57a9734eec1f Mon Sep 17 00:00:00 2001 From: zhuoqinglian <1035449612@qq.com> Date: Mon, 16 Mar 2026 09:46:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=E6=99=BA=E8=83=BD?= =?UTF-8?q?=E4=BD=93=E7=AE=A1=E7=90=86=E5=85=A8=E5=B1=80=E8=A7=A6=E5=8F=91?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=88=B7=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/manager-mobile/src/pages/agent/index.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/main/manager-mobile/src/pages/agent/index.vue b/main/manager-mobile/src/pages/agent/index.vue index 49f11e57..c6befce0 100644 --- a/main/manager-mobile/src/pages/agent/index.vue +++ b/main/manager-mobile/src/pages/agent/index.vue @@ -51,17 +51,18 @@ const currentTab = ref('agent-config') // 刷新和加载状态 const refreshing = ref(false) - -// 计算是否启用下拉刷新(角色编辑页面不启用) -const refresherEnabled = computed(() => { - return currentTab.value !== 'agent-config' -}) +const refresherEnabled = ref(false) // 子组件引用 const deviceRef = ref() const chatRef = ref() const voiceprintRef = ref() +// 更新刷新器状态 +function updateRefresherEnabled(value: boolean) { + refresherEnabled.value = value +} + // Tab 配置 const tabList = [ { @@ -144,6 +145,10 @@ async function onLoadMore() { } } +watch(() => currentTab.value, (newTab) => { + updateRefresherEnabled(newTab !== 'agent-config') +}) + // 接收页面参数 onLoad((options) => { if (options?.agentId) { @@ -204,6 +209,7 @@ onMounted(async () => { v-else-if="currentTab === 'voiceprint-management'" ref="voiceprintRef" :agent-id="currentAgentId" + @update-refresher-enabled="updateRefresherEnabled" />