Skip to content

ImageUpload

A secondary encapsulation of the element-plus upload component. It simplifies basic image operations.

Basic Usage

INFO

Use the api for asynchronous logic to customize the upload process, then construct the image URL parameter url.

Multiple Image Control

Properties

Property NameDescriptionTypeExtendedDefault Value
v-modelImage URLstringYes-
apiAsynchronous upload methodFunctionYes-
image-typesImage format restrictionsArrayYeswebp,png,jpg,gif,bmp,jpeg
limit-sizeImage size limit in MBnumberYes10
styleCustom styleRecordYes{ width: '100px', height: '100px' }
fixImage fill modeenumYescontain
actionRequest URLstringNo""
disabledDisable the uploadbooleanNofalse
on-successHook triggered on successful uploadFunctionNo-
on-errorHook triggered on upload failureFunctionNo-
on-progressHook triggered during file uploadFunctionNo-
on-changeHook triggered when file status changesFunctionNo-

Events

Event NameDescriptionTypeExtended
update:model-valueTriggered when the bound value changesFunctionNo

Released under the MIT License