fix: accept image in edit page
This commit is contained in:
@@ -53,6 +53,7 @@ type CanvasImageEditorProps = {
|
||||
handleUpdateImageList: (fileList: any[]) => void;
|
||||
handleUpdateMaskList: (fileList: any[]) => void;
|
||||
uploadButton?: React.ReactNode;
|
||||
accept?: string;
|
||||
imageStatus: {
|
||||
isOriginal: boolean;
|
||||
isResetNeeded: boolean;
|
||||
@@ -70,11 +71,12 @@ const CanvasImageEditor: React.FC<CanvasImageEditorProps> = forwardRef(
|
||||
imageSrc,
|
||||
disabled: isDisabled,
|
||||
imageStatus,
|
||||
maskUpload,
|
||||
accept,
|
||||
onSave,
|
||||
onScaleImageSize,
|
||||
handleUpdateImageList,
|
||||
handleUpdateMaskList,
|
||||
maskUpload
|
||||
handleUpdateMaskList
|
||||
},
|
||||
ref
|
||||
) => {
|
||||
@@ -544,6 +546,7 @@ const CanvasImageEditor: React.FC<CanvasImageEditorProps> = forwardRef(
|
||||
lineWidth={lineWidth}
|
||||
invertMask={invertMask}
|
||||
loading={loading}
|
||||
accept={accept}
|
||||
></ToolsBar>
|
||||
|
||||
<ImageActionsBar
|
||||
|
||||
@@ -19,6 +19,7 @@ interface ToolsBarProps {
|
||||
lineWidth: number;
|
||||
uploadButton?: React.ReactNode;
|
||||
invertMask?: boolean;
|
||||
accept?: string;
|
||||
handleBrushSizeChange: (value: number) => void;
|
||||
undo: () => void;
|
||||
onClear: () => void;
|
||||
@@ -33,6 +34,7 @@ const ToolsBar: React.FC<ToolsBarProps> = (props) => {
|
||||
loading,
|
||||
lineWidth,
|
||||
invertMask,
|
||||
accept,
|
||||
handleBrushSizeChange,
|
||||
undo,
|
||||
onClear,
|
||||
@@ -97,7 +99,7 @@ const ToolsBar: React.FC<ToolsBarProps> = (props) => {
|
||||
disabled={loading || invertMask}
|
||||
handleUpdateImgList={handleUpdateImageList}
|
||||
size="middle"
|
||||
accept="image/*"
|
||||
accept={accept}
|
||||
></UploadImg>
|
||||
<UploadImg
|
||||
title={intl.formatMessage({
|
||||
@@ -107,7 +109,7 @@ const ToolsBar: React.FC<ToolsBarProps> = (props) => {
|
||||
disabled={loading || invertMask}
|
||||
handleUpdateImgList={handleUpdateMaskList}
|
||||
size="middle"
|
||||
accept="image/*"
|
||||
accept={accept}
|
||||
></UploadImg>
|
||||
<Tooltip title={intl.formatMessage({ id: 'playground.image.fitview' })}>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user