mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-30 04:40:18 +08:00
fix(ui): import term tooltip helpers in config pages
Gateway 配置页和模型配置页都会在 label 中渲染术语帮助按钮,并在页面渲染后调用 tooltip 绑定逻辑。 这两个页面之前引用了 termHelpHtml / attachTermTooltips,但没有导入对应 helper,导致 Gateway 配置页加载配置后直接抛出 ReferenceError,页面停在加载失败状态。 ## 修复 - Gateway 配置页补充 term-tooltip helper import - 模型配置页补充同一 helper import,避免进入编辑服务商弹窗时触发同类运行时错误 ## 验证 - npm run build:PASS
This commit is contained in:
@@ -6,6 +6,7 @@ import { toast } from '../components/toast.js'
|
||||
import { humanizeError } from '../lib/humanize-error.js'
|
||||
import { tryShowEngagement } from '../components/engagement.js'
|
||||
import { t } from '../lib/i18n.js'
|
||||
import { termHelpHtml, attachTermTooltips } from '../lib/term-tooltip.js'
|
||||
|
||||
// 兼容新版 SecretRef:token 可能是 string 或 { $env: "VAR" } / { $ref: "x/y" }
|
||||
function _tokenDisplayStr(token) {
|
||||
|
||||
@@ -10,6 +10,7 @@ import { icon, statusIcon } from '../lib/icons.js'
|
||||
import { API_TYPES, PROVIDER_PRESETS, QTCOOL, MODEL_PRESETS, fetchQtcoolModels } from '../lib/model-presets.js'
|
||||
import { t } from '../lib/i18n.js'
|
||||
import { scheduleGatewayRestart, fireRestartNow, cancelPendingRestart, onRestartState } from '../lib/gateway-restart-queue.js'
|
||||
import { termHelpHtml, attachTermTooltips } from '../lib/term-tooltip.js'
|
||||
|
||||
// HTML 转义,防止错误信息中的特殊字符破坏页面或被注入
|
||||
function escapeHtml(str) {
|
||||
|
||||
Reference in New Issue
Block a user