From 4558f63af8ac007b9f35c2e1649f4218133d2dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Mon, 27 Mar 2023 17:42:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=A4=B4=E5=83=8F=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compenents/user-info/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compenents/user-info/index.tsx b/src/compenents/user-info/index.tsx index 4420bd4..23e79ad 100644 --- a/src/compenents/user-info/index.tsx +++ b/src/compenents/user-info/index.tsx @@ -44,7 +44,10 @@ export const UserInfoModel: React.FC = ({ open, onCancel }) => { authorization: "Bearer " + getToken(), }, beforeUpload: (file) => { - const isPNG = file.type === ("image/png" || "image/jpg"); + const isPNG = + file.type === "image/png" || + file.type === "image/jpg" || + file.type === "image/jpeg"; if (!isPNG) { message.error(`${file.name}不是图片文件`); }