app selector support scope

This commit is contained in:
JzoNg
2024-12-20 11:59:18 +08:00
parent 6d2b2d7810
commit 5c6916354e
4 changed files with 21 additions and 4 deletions

View File

@ -112,6 +112,7 @@ export type CredentialFormSchemaBase = {
tooltip?: TypeWithI18N
show_on: FormShowOnObject[]
url?: string
scope?: string
}
export type CredentialFormSchemaTextInput = CredentialFormSchemaBase & { max_length?: number; placeholder?: TypeWithI18N }

View File

@ -351,6 +351,7 @@ const Form: FC<FormProps> = ({
variable,
label,
required,
scope,
} = formSchema as (CredentialFormSchemaTextInput | CredentialFormSchemaSecretInput)
return (
@ -366,6 +367,7 @@ const Form: FC<FormProps> = ({
</div>
<AppSelector
disabled={readonly}
scope={scope}
value={value[variable]}
onSelect={item => handleFormChange(variable, { ...item, type: FormTypeEnum.appSelector } as any)}
/>