diff --git a/frontend/src/components/pages/ComponentsModelsPage.tsx b/frontend/src/components/pages/ComponentsModelsPage.tsx index 2db73ac..4c5c3a9 100644 --- a/frontend/src/components/pages/ComponentsModelsPage.tsx +++ b/frontend/src/components/pages/ComponentsModelsPage.tsx @@ -6,7 +6,6 @@ import { ChevronUp, Copy, Eye, - EyeOff, Loader2, MoreHorizontal, Pencil, @@ -933,8 +932,6 @@ function DynamicField({ storedValueMask?: string; onChange: (value: unknown) => void; }) { - const [showPassword, setShowPassword] = useState(false); - if (field.type === "boolean") { return (
@@ -984,31 +981,13 @@ function DynamicField({
)} -
- { - const nextValue = event.target.value; - if (!nextValue) setShowPassword(false); - onChange(nextValue); - }} - placeholder={ - hasStoredValue ? "已配置,留空则保持不变" : undefined - } - autoComplete="new-password" - className="pr-10" - /> - -
+ onChange(event.target.value)} + placeholder={hasStoredValue ? "已配置,留空则保持不变" : undefined} + autoComplete="new-password" + /> {hasStoredValue && (

仅显示当前密钥首尾用于识别。留空可保持原密钥,输入新值将覆盖原密钥。