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:
takatost
2023-08-12 00:57:13 +08:00
committed by GitHub
parent 5fa2161b05
commit d10ef17f17
259 changed files with 9105 additions and 1392 deletions

View File

@@ -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='

View File

@@ -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

View File

@@ -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]
}