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

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

}