• 2024-05-21uni.chooseImage多个上传
     uni.chooseImage({count:9,//从相册选择sourceType:['album'],success:(res)=>{this.fileList=res.tempFiles//res.t
  • 2024-04-02uniapp上传图片
     如图:<viewclass="flex-subflex"v-else-if="field.type=='image'||!field.type"> <viewclass="flex-sub"> <imagev-if="form[field.name]":src="form[field.name]"mode="aspectF
  • 2023-11-22uniapp app上传图片并设置超过10m进行图片压缩
    组件页面<template>   <viewclass="upload-wrapper">      <viewv-if="pictureUrl.length">         <viewclass="preview"v-for="(item,index)inpictureUrl":key='index'>        
  • 2023-08-17微信小程序:发布动态页面模板
    1前言由于功能需求,需要在小程序中开发社区打卡模块。打卡模块中上传发布的界面是必不可少的。于是利用flex布局设计了上传动态的页面。页面截图如下:由于是模板分享,这里也不做过多介绍了,通过代码来说明吧。页面主要有四个文件,分别是create.js、create.json、create.wxml、cre
  • 2023-06-01微信小程序upload多张图片同时上传
    //上传图片,选择图片chooseImage:function(e){varthat=this;wx.chooseImage({sizeType:['original','compressed'],//可以指定是原图还是压缩图,默认二者都有sourceType:['album','camera'],//可以指定来源是相册还是相机
  • 2022-10-07微信小程序上传文件(可传 word、excel、ppt、视频、图片……)
    目录前言示例代码前言近期做技术调研时发现微信官方支持文件上传了,这里记录一下官方API:wx.chooseMessageFile(Objectobject)交互:从微信聊天里选择文件(选一个好友/群
  • 2022-08-25小程序图片上传
    原生:<viewbindtap="uploadAct">上传</view>uploadAct(){wx.chooseImage({success(res){consttempFilePaths=res.tempFilePaths
  • 2022-08-22uniapp上传图片
    1、getUploadImg(e){ uni.chooseImage({ count:9, //默认9 sizeType:['compressed'], sourceType:['album','camera'], success:(res)=>{