uni-app限制图片类型

uni.chooseFile

uni.chooseImage()

//限制图片类型以及过滤git图
let resType = res.tempFiles[0].type.substring(0,5)
if(resType!='image' || res.tempFiles[0].type.substring(6,7) == 'g'){
  uni.showToast({
      title: "限制图片类型以及过滤git图",
      icon: 'none',
      duration: 2000,
      mask: true
  });
  return
}
 

 

 

相关文章:

  • 2021-06-07
  • 2021-12-23
  • 2021-08-24
  • 2021-11-11
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-06
  • 2022-12-23
  • 2022-01-01
  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案