ado5 3903c18ce2 first commit hai 9 meses
..
README.en-US.md 3903c18ce2 first commit hai 9 meses
README.md 3903c18ce2 first commit hai 9 meses
props.d.ts 3903c18ce2 first commit hai 9 meses
props.js 3903c18ce2 first commit hai 9 meses
type.d.ts 3903c18ce2 first commit hai 9 meses
type.js 3903c18ce2 first commit hai 9 meses
upload-info.json 3903c18ce2 first commit hai 9 meses
upload.d.ts 3903c18ce2 first commit hai 9 meses
upload.js 3903c18ce2 first commit hai 9 meses
upload.json 3903c18ce2 first commit hai 9 meses
upload.wxml 3903c18ce2 first commit hai 9 meses
upload.wxss 3903c18ce2 first commit hai 9 meses

README.en-US.md

:: BASE_DOC ::

API

Upload Props

name | type | default | description | required -- | -- | -- | -- | -- add-content | String / Slot | - | - | N allow-upload-duplicate-file | Boolean | false | - | N config | Object | - | Typescript:UploadMpConfig type UploadMpConfig = ImageConfig \| VideoConfig interface ImageConfig { count?: number; sizeType?: Array<SizeTypeValues>; sourceType?: Array<SourceTypeValues> } type SizeTypeValues = 'original' \| 'compressed' type SourceTypeValues = 'album' \| 'camera' interface VideoConfig { sourceType?: Array<SourceTypeValues>; compressed?: boolean; maxDuration?: number; camera?: 'back' \| 'front' }see more ts definition | N custom-style | String | - | - | N file-list-display | Slot | - | see more ts definition | N files | Array | - | Typescript:Array<UploadFile> interface UploadFile { url: string; name?: string; size?: number; type?: 'image' \| 'video'; percent?: number; status: 'loading' \| 'reload' \| 'failed' \| 'done' }see more ts definition | N default-files | Array | undefined | uncontrolled property。Typescript:Array<UploadFile> interface UploadFile { url: string; name?: string; size?: number; type?: 'image' \| 'video'; percent?: number; status: 'loading' \| 'reload' \| 'failed' \| 'done' }see more ts definition | N grid-config | Object | - | Typescript:{column?: number; width?: number; height?: number;} | N gutter | Number | 16 | - | N image-props | Object | - | Typescript:ImagePropsImage API Documentssee more ts definition | N max | Number | 0 | - | N media-type | Array | ['image', 'video'] | Typescript:Array<MediaType> type MediaType = 'image' \| 'video'see more ts definition | N request-method | Function | - | - | N size-limit | Number / Object | - | Typescript:number \| SizeLimitObj interface SizeLimitObj { size: number; unit: SizeUnit ; message?: string } type SizeUnitArray = ['B', 'KB', 'MB', 'GB'] type SizeUnit = SizeUnitArray[number]see more ts definition | N source | String | media | options:media/messageFile | N

Upload Events

name | params | description -- | -- | -- add | (files: MediaContext) | see more ts definition
type MediaContext = VideoContext[] \| ImageContext[]

interface VideoContext { name?: string; type?: string; url?: string; duration?: number; size?: number; width?: number; height?: number; thumb: string; progress: number }

interface ImageContext { name: string; type: string; url: string; size: number; width: number; height: number; progress: number }
complete | - | - fail | - | - remove | (index: number; file: UploadFile) | - select-change | (currentSelectedFiles: MediaContext[]) | - success | (files: MediaContext) | see more ts definition
type MediaContext = VideoContext[] \| ImageContext[]

interface VideoContext { name?: string; type?: string; url?: string; duration?: number; size?: number; width?: number; height?: number; thumb: string; progress: number }

interface ImageContext { name: string; type: string; url: string; size: number; width: number; height: number; progress: number }