$ npm install universal-choose-image
Choose image.
$ npm install universal-choose-image --save
import chooseImage from 'universal-choose-image';
chooseImage().then(res => {
})
chooseImage(options)
Property | Type | Description | require | Default | Supported |
---|---|---|---|---|---|
options | object |
Options | false | - | |
options.count | number |
Maximum number of choices | false | 1 |
mp |
options.sourceType | array |
Album selection or photo taking | false | [camera, album] |
mp |
Property | Type | Description |
---|---|---|
res | object |
|
res.data | base64 | string |
Web for base64, mini app for the image path |
© 2010 - cnpmjs.org x YWFE | Home | YWFE