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}不是图片文件`); }