lhl 1c9c1e8c4e 9-28 1 anno fa
..
Sansnn-uQRCode 1c9c1e8c4e 9-28 1 anno fa
js_sdk 1c9c1e8c4e 9-28 1 anno fa
jyf-parser 1c9c1e8c4e 9-28 1 anno fa
lime-painter 1c9c1e8c4e 9-28 1 anno fa
more 1c9c1e8c4e 9-28 1 anno fa
poiuy-uImgUpload 1c9c1e8c4e 9-28 1 anno fa
shmily-drag-image 1c9c1e8c4e 9-28 1 anno fa
ss-calendar 1c9c1e8c4e 9-28 1 anno fa
tki-qrcode 1c9c1e8c4e 9-28 1 anno fa
uni-badge 1c9c1e8c4e 9-28 1 anno fa
uni-countdown 1c9c1e8c4e 9-28 1 anno fa
uni-icons 1c9c1e8c4e 9-28 1 anno fa
uni-list 1c9c1e8c4e 9-28 1 anno fa
uni-list-item 1c9c1e8c4e 9-28 1 anno fa
uni-load-more 1c9c1e8c4e 9-28 1 anno fa
uni-nav-bar 1c9c1e8c4e 9-28 1 anno fa
uni-notice-bar 1c9c1e8c4e 9-28 1 anno fa
uni-popup 1c9c1e8c4e 9-28 1 anno fa
uni-search-bar 1c9c1e8c4e 9-28 1 anno fa
uni-status-bar 1c9c1e8c4e 9-28 1 anno fa
uni-swipe-action 1c9c1e8c4e 9-28 1 anno fa
uni-swipe-action-item 1c9c1e8c4e 9-28 1 anno fa
uni-tag 1c9c1e8c4e 9-28 1 anno fa
uni-transition 1c9c1e8c4e 9-28 1 anno fa
w-picker 1c9c1e8c4e 9-28 1 anno fa
wangding-pickerAddress 1c9c1e8c4e 9-28 1 anno fa
wangding-pickerAddressindex 1c9c1e8c4e 9-28 1 anno fa
xw-empty 1c9c1e8c4e 9-28 1 anno fa
zhilin-picker 1c9c1e8c4e 9-28 1 anno fa
zhtx-uploadImg 1c9c1e8c4e 9-28 1 anno fa
zhuge-swiper 1c9c1e8c4e 9-28 1 anno fa
README.md 1c9c1e8c4e 9-28 1 anno fa
empty.vue 1c9c1e8c4e 9-28 1 anno fa
espempty.vue 1c9c1e8c4e 9-28 1 anno fa
jyf-parser(1).zip 1c9c1e8c4e 9-28 1 anno fa
newOne.vue 1c9c1e8c4e 9-28 1 anno fa
permission.js 1c9c1e8c4e 9-28 1 anno fa
share.vue 1c9c1e8c4e 9-28 1 anno fa
uni-number-box.vue 1c9c1e8c4e 9-28 1 anno fa
upload-image.vue 1c9c1e8c4e 9-28 1 anno fa
upload-images.vue 1c9c1e8c4e 9-28 1 anno fa

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
		}
	})

}