admin 发表于 2014-8-12 23:39:41

phonegap 多图片选择插件

默认在我们phoengap中只能一次选择一张图片,所以很多人都很纠结,下面给大家分享一个 phonegap 多图片选择插件

github地址:

https://github.com/wymsee/cordova-imagePicker


phonegap 3.0以上在线安装地址:

phonegap plugin add https://github.com/wymsee/cordova-imagePicker.git

cordova plugin add https://github.com/wymsee/cordova-imagePicker.git
使用插件:
The plugin creates the object window.imagePicker with the method getPictures(success, fail, options)
Example - Get Full Size Images (all default options):

The plugin creates the object window.imagePicker with the method getPictures(success, fail, options)

Example - Get Full Size Images (all default options):

window.imagePicker.getPictures(
    function(results) {
      for (var i = 0; i < results.length; i++) {
            console.log('Image URI: ' + results);
      }
    }, function (error) {
      console.log('Error: ' + error);
    }
);

Example - Get at most 10 images scaled to width of 800:

window.imagePicker.getPictures(
    function(results) {
      for (var i = 0; i < results.length; i++) {
            console.log('Image URI: ' + results);
      }
    }, function (error) {
      console.log('Error: ' + error);
    }, {
      maximumImagesCount: 10,
      width: 800
    }
);




本地下载地址:



index 发表于 2014-8-13 18:30:46

可以具体讲下使用步奏吗?新人看了源代码不懂怎么弄?谢了

359977465 发表于 2014-8-16 02:00:06

如果不是node下安装的,要复制到哪些目录才能对应得上?

admin 发表于 2014-12-15 22:14:59

359977465 发表于 2014-8-16 02:00
如果不是node下安装的,要复制到哪些目录才能对应得上?

下载 git

kissgo156 发表于 2015-12-10 10:49:22

下载后怎么本地安装

maclee 发表于 2016-3-17 11:26:49

eclipse下怎么用?

rcmyy123 发表于 2016-3-24 19:50:08

问一下,你代码中的maximumImagesCount的作用是什么,假如我要设置勾选了三张图片之后其他照片无法被勾选应该怎么做呢?

admin 发表于 2016-3-25 18:14:44

kissgo156 发表于 2015-12-10 10:49
下载后怎么本地安装

下载后本地安装也是    cordova plugin add 本地地址

274860460 发表于 2016-5-24 17:22:47

results 放在img src属性中显示空白?

angele 发表于 2017-2-16 15:16:57

android 4.4.4 打开相册闪退,有解决办法么
页: [1] 2
查看完整版本: phonegap 多图片选择插件