Skip to content

fix: external retrieval auth switch display - #7825

Merged
fit2cloudwxx merged 1 commit into
v3from
pr@v3@fix_externalRetrivalSwitchDisplay
Nov 11, 2026
Merged

fit2cloudwxx merged 1 commit into
v3from
pr@v3@fix_externalRetrivalSwitchDisplay

Conversation

@shaohuzhang1

@shaohuzhang1 shaohuzhang1 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

【【知识库】-外部检索服务中 API服务关闭时不应该显示对话用户授权设置】
https://www.tapd.cn/tapd_fe/45245355/bug/detail/1145245355001079155

<section v-if="setting.enabled">
<div class="mb-2">
<span>对话用户授权</span>
<span class="text-N600"> (开启后,仅允许授权的对话用户通过 APIKey 检索当前知识库)</span>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diff appears to be a Vue.js single-file component change. Here is an analysis:

Potential Issues & Observations:

  1. Missing Closing Tag in Diff Context: The diff only shows the opening <section> tag being modified. Ensure there is a matching </section> closer for this element. If the original code had nested elements or other siblings inside that section, confirm they are still correctly grouped within this v-if-controlled section.

  2. Reactivity Dependency: The condition setting.enabled relies on a reactive property named setting.

    • Ensure that setting is a defined reactive object (e.g., via reactive() or ref()).
    • Verify that handleSettingChange('enabled', $event) correctly updates setting.enabled to avoid UI desynchronization.
  3. UX Consideration: Hiding the entire authorization section (v-if="setting.enabled") when disabled means users won't see the description text explaining what "dialogue user authorization" does until they enable the main toggle. This might reduce discoverability. Consider disabling the inner controls instead of hiding the whole block if user education is important.

  4. No Syntax Errors in Changed Line: The syntax of v-if="setting.enabled" is correct for Vue 3.

Optimization Suggestion:
If setting is a large object, accessing .enabled directly is efficient. However, if you frequently access multiple properties from setting, consider destructuring or ensuring fine-grained reactivity if performance becomes an issue (though unlikely for simple visibility toggles).

Verdict:
The change is syntactically standard Vue 3 code. No critical bugs detected, but validate the closing tag and ensure the UX intent (hiding vs. disabling) matches requirements.

@fit2cloudwxx
fit2cloudwxx merged commit 5a423f6 into v3 Nov 11, 2026
3 of 4 checks passed
@fit2cloudwxx
fit2cloudwxx deleted the pr@v3@fix_externalRetrivalSwitchDisplay branch November 11, 2026 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants