1.0.36 • Published 7 years ago
yu-img-upload v1.0.36
Introduce
this script is just for image upload,it support pc ios and android. in pc & ios you can clear what you picked and repick the pictures;in android you should pick and delete the picture only one by one.
Quick to start
Using npm:
$ npm install --save yu-img-upload
$ import imgUpload from 'yu-img-upload'
Example
You can use npm run dev
to check the example file in node package
new imgUpload({
popup:true,
multiple:true,
name:'file',
target:document.querySelector('.imgUpload'),
maxnum:6,
maxsize:0.5,
accept:'image/gif,image/jpeg,image/jpg,image/png,image/svg',
hint:'icon',
});
JSDoc
* @param {object[]} option
* @param {boolean} [option[].popup = true] - should it use yu-popup or alert
* @param {boolean} [option[].multiple = true] - should it accept multiple files
* @param {string} [option[].name = file] - the name of input
* @param {obejct} [option[].target = document.querySelector('.imgUpload')] - which dom to render
* @param {number} [option[].maxnum = 9] - the max number of pictures that can be upload
* @param {number} [option[].maxsize = 1] - the max size of eeach picture
* @param {string} [option[].accept = image/gif,image/jpeg,image/jpg,image/png,image/svg] - the format of picture that can be accepted
* @param {string} [option[].hint = icon] - how button shows
Links
1.0.36
7 years ago
1.0.35
7 years ago
1.0.34
7 years ago
1.0.33
7 years ago
1.0.32
7 years ago
1.0.31
7 years ago
1.0.30
7 years ago
1.0.29
7 years ago
1.0.28
7 years ago
1.0.27
7 years ago
1.0.26
8 years ago
1.0.25
8 years ago
1.0.24
8 years ago
1.0.23
8 years ago
1.0.22
8 years ago
1.0.21
8 years ago
1.0.20
8 years ago
1.0.19
8 years ago
1.0.18
8 years ago
1.0.17
8 years ago
1.0.16
8 years ago
1.0.15
8 years ago
1.0.14
8 years ago
1.0.13
8 years ago
1.0.12
8 years ago
1.0.11
8 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago
1.0.4
8 years ago
1.0.3
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago