lhl 37f5c1017d 2-17-1 2 gadi atpakaļ
..
DateTimePicker 37f5c1017d 2-17-1 2 gadi atpakaļ
Sansnn-uQRCode 37f5c1017d 2-17-1 2 gadi atpakaļ
js_sdk 37f5c1017d 2-17-1 2 gadi atpakaļ
jyf-parser 37f5c1017d 2-17-1 2 gadi atpakaļ
lb-picker 37f5c1017d 2-17-1 2 gadi atpakaļ
lime-painter 37f5c1017d 2-17-1 2 gadi atpakaļ
more 37f5c1017d 2-17-1 2 gadi atpakaļ
poiuy-uImgUpload 37f5c1017d 2-17-1 2 gadi atpakaļ
shmily-drag-image 37f5c1017d 2-17-1 2 gadi atpakaļ
ss-calendar 37f5c1017d 2-17-1 2 gadi atpakaļ
tki-qrcode 37f5c1017d 2-17-1 2 gadi atpakaļ
top-title 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-badge 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-countdown 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-icons 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-list 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-list-item 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-load-more 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-nav-bar 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-notice-bar 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-popup 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-search-bar 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-status-bar 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-swipe-action 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-swipe-action-item 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-tag 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-transition 37f5c1017d 2-17-1 2 gadi atpakaļ
w-picker 37f5c1017d 2-17-1 2 gadi atpakaļ
wangding-pickerAddress 37f5c1017d 2-17-1 2 gadi atpakaļ
wangding-pickerAddressindex 37f5c1017d 2-17-1 2 gadi atpakaļ
xw-empty 37f5c1017d 2-17-1 2 gadi atpakaļ
zhilin-picker 37f5c1017d 2-17-1 2 gadi atpakaļ
zhtx-uploadImg 37f5c1017d 2-17-1 2 gadi atpakaļ
README.md 37f5c1017d 2-17-1 2 gadi atpakaļ
empty.vue 37f5c1017d 2-17-1 2 gadi atpakaļ
espempty.vue 37f5c1017d 2-17-1 2 gadi atpakaļ
jyf-parser(1).zip 37f5c1017d 2-17-1 2 gadi atpakaļ
newOne.vue 37f5c1017d 2-17-1 2 gadi atpakaļ
permission.js 37f5c1017d 2-17-1 2 gadi atpakaļ
share.vue 37f5c1017d 2-17-1 2 gadi atpakaļ
uni-number-box.vue 37f5c1017d 2-17-1 2 gadi atpakaļ
upload-image.vue 37f5c1017d 2-17-1 2 gadi atpakaļ
upload-images.vue 37f5c1017d 2-17-1 2 gadi atpakaļ

README.md

插件安装

图片上传组件 将组件放在自己的组件库里导入即可

**注意 1.组件加入后一定要去修改自己的上传路径!
2.自己的上传接口的返回值注意修改 我这边是0! **

导入:

小程序.json 文件里

"usingComponents": {
	"imgUpload":"/component/imgUpload/imgUpload"
  },


属性 attribute

属性名 类型 介绍 默认值
imgArr Array 图片展示列表 []
uploadImgCount Number 一次可选多少张图片 3
imgCount Number 一共可以上传多少张图片 3
imgSize Number 上传图片的大小 2 (M)
closeTip Boolean 关闭小提示 false

方法 method

开始上传图片 在父页面中调用该方法 注意 一定要给组件 id 如下(示范代码)


####示范代码 wxml:

<imgUpload id="imgUpload" imgArr="{{imgArr}}"></imgUpload>
<button bindtap="submit"></button>

*js*:

submit(){

	const imgUpload = this.selectComponent("#imgUpload");
	imgUpload.upload(res=>{
		if(res.code==0){
				// 正常的返回code=0 将回调的线上图片数组 赋值给需要提交的表单里
				// res.urlArray 线上路径图片数组
				//TODO
				
		}else{
			//没有上传图片的返回 code=400
		}
	})

}