mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 11:26:52 +08:00
feat: frontend multi models support (#804)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: Joel <iamjoel007@gmail.com>
This commit is contained in:
@@ -54,7 +54,7 @@ const KeyInput = ({
|
||||
<div className="mb-2 text-[13px] font-medium text-gray-800">{name}</div>
|
||||
<div className='
|
||||
flex items-center px-3 bg-white rounded-lg
|
||||
shadow-[0_1px_2px_rgba(16,24,40,0.05)]
|
||||
shadow-xs
|
||||
'>
|
||||
<input
|
||||
className='
|
||||
|
||||
@@ -13,7 +13,7 @@ export type ValidatedStatusState = {
|
||||
|
||||
export type Status = 'add' | 'fail' | 'success'
|
||||
|
||||
export type ValidateValue = Record<string, string | undefined>
|
||||
export type ValidateValue = Record<string, string | undefined | boolean>
|
||||
|
||||
export type ValidateCallback = {
|
||||
before: (v?: ValidateValue) => boolean | undefined
|
||||
|
||||
@@ -14,7 +14,6 @@ export const useValidate: (value: ValidateValue) => [DebouncedFunc<(validateCall
|
||||
setValidatedStatus({})
|
||||
return
|
||||
}
|
||||
|
||||
setValidating(true)
|
||||
|
||||
if (validateCallback.run) {
|
||||
@@ -26,7 +25,7 @@ export const useValidate: (value: ValidateValue) => [DebouncedFunc<(validateCall
|
||||
|
||||
setValidating(false)
|
||||
}
|
||||
}, { wait: 500 })
|
||||
}, { wait: 1000 })
|
||||
|
||||
return [run, validating, validatedStatus]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user