收藏
回答

报告一个写错的

https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.chooseImage.html


wx.chooseImage({
  count: 1,
  sizeType: ['original', 'compressed'],
  sourceType: ['album', 'camera'],
  success (res) {
    // tempFilePath可以作为img标签的src属性显示图片
    const tempFilePaths = res.tempFilePaths
  }
})


tempFilePath

这个地方是不是应该修改为 tempFilePaths

少了一个 s

最后一次编辑于  2020-12-11
回答关注问题邀请回答
收藏

2 个回答

  • 小程序技术专员-binnie
    小程序技术专员-binnie
    2021-02-08

    tempFilePath 可以理解为 tempFilePaths 数组中的一个,可以作为 img 标签的 src 属性

    2021-02-08
    有用 1
    回复
  • 社区技术运营专员--阳光
    社区技术运营专员--阳光
    2020-12-11

    你好,感谢反馈,我们核实下

    2020-12-11
    有用
    回复
登录 后发表内容
问题标签