universal-choose-image
Choose image.
Last updated 5 years ago by balloonzzq .
BSD-3-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ npm install universal-choose-image 
SYNC missed versions from official npm registry.

universal-choose-image npm

选取图片

支持

browser miniApp wechatMiniprogram bytedanceMicroApp quickApp

安装

$ npm install universal-choose-image --save

使用

import chooseImage from 'universal-choose-image';

// 快应用中的引入方法
// import chooseImage from 'universal-choose-image/lib/quickapp;

chooseImage().then(res => {
})

方法

chooseImage(options)

选取照片数据

参数

成员 类型 描述 必选 默认值 支持
options object 选取照片参数 -
options.count number 最大可选照片数 1 browser miniApp wechatMiniprogram bytedanceMicroApp
options.sourceType array 相册选取或者拍照 camera, album miniApp wechatMiniprogram bytedanceMicroApp quickApp
options.accept string 允许的文件类型 image/* browser

返回值

成员 类型 描述
res object
res.data string[] Web 环境为 base64 数据,小程序中为图片路径
res.files File[] 仅 Web 环境存在,为原始的文件对象

Current Tags

  • 1.0.0-beta.2                                ...           beta (5 years ago)
  • 1.3.0                                ...           latest (4 years ago)

7 Versions

  • 1.3.0                                ...           4 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0-beta.2                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 1.0.0-beta.1                                ...           5 years ago
Maintainers (1)
Downloads
Total 1
Today 1
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (13)
Dependents (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE