fix: auth error.perf: prompt,process img

This commit is contained in:
archer
2023-05-04 15:08:09 +08:00
parent c879905307
commit 2d74fa8e10
5 changed files with 58 additions and 34 deletions

View File

@@ -26,7 +26,7 @@ import { formatPrice } from '@/utils/user';
import { useConfirm } from '@/hooks/useConfirm';
import { useSelectFile } from '@/hooks/useSelectFile';
import { useToast } from '@/hooks/useToast';
import { fileToBase64, compressImg } from '@/utils/file';
import { compressImg } from '@/utils/file';
const ModelEditForm = ({
formHooks,
@@ -112,7 +112,14 @@ const ModelEditForm = ({
<Box flex={'0 0 80px'} w={0}>
:
</Box>
<Select isDisabled={!isOwner} {...register('chat.chatModel')}>
<Select
isDisabled={!isOwner}
{...register('chat.chatModel', {
onChange() {
setRefresh((state) => !state);
}
})}
>
{chatModelList.map((item) => (
<option key={item.chatModel} value={item.chatModel}>
{item.name}