diff --git a/src/views/system/user/utils/hook.tsx b/src/views/system/user/utils/hook.tsx index 5cad74de3..77d15d474 100644 --- a/src/views/system/user/utils/hook.tsx +++ b/src/views/system/user/utils/hook.tsx @@ -10,6 +10,7 @@ import { usePublicHooks } from "../../hooks"; import { addDialog } from "@/components/ReDialog"; import type { PaginationProps } from "@pureadmin/table"; import type { FormItemProps, RoleFormItemProps } from "../utils/types"; +import userAvatar from "@/assets/user.jpg"; import { getKeyList, isAllEmpty, @@ -85,8 +86,8 @@ export function useUser(tableRef: Ref, treeRef: Ref) { ), @@ -370,7 +371,7 @@ export function useUser(tableRef: Ref, treeRef: Ref) { contentRenderer: () => h(croppingUpload, { ref: cropRef, - imgSrc: row.avatar, + imgSrc: row.avatar || userAvatar, onCropper: info => (avatarInfo.value = info) }), beforeSure: done => {