perf: binary avatar

This commit is contained in:
archer
2023-06-14 22:26:11 +08:00
parent 7c159d8aba
commit 7c52cec0ea
16 changed files with 98 additions and 14 deletions

View File

@@ -114,12 +114,14 @@ const Info = (
const file = e[0];
if (!file) return;
try {
const base64 = await compressImg({
const src = await compressImg({
file,
maxW: 100,
maxH: 100
});
setValue('avatar', base64);
setValue('avatar', src);
setRefresh((state) => !state);
} catch (err: any) {
toast({