直接上代码

实现功能为:当fbphotoFirst为空时,src路径为“pic/信息反馈1-1_14.png“,并且点击事件uploadfbphotoFirst有效,否则为路径fbphotoFirst,此时点击事件uploadfbphotoFirst无效,uploadfbphotoFirst为上传图片的方法,即上传图片成功后不支持修改

<image class="uploadimageclass"
  bindtap="{{fbphotoFirst==''?'uploadfbphotoFirst':''}}" mode="aspectFit" src="{{fbphotoFirst==''?'pic/信息反馈1-1_14.png':fbphotoFirst}}"></image>
  <image class="uploadimageclass"
  bindtap="uploadfbphotoSecend" mode="aspectFit" src="{{fbphotoFirst==''?'pic/信息反馈1-1_14.png':fbphotoSecend}}"></image>
  <image class="uploadimageclass"
  bindtap="uploadfbphotothird" mode="aspectFit" src="{{fbphotoFirst==''?'pic/信息反馈1-1_14.png':fbphotothird}}"></image>
 

等效于以下代码
 <!--<view wx:if="{{fbphotoFirst==''}}">
 <image class="uploadimageclass" bindTap="uploadfbphotoFirst" src="../../../image/信息反馈/信息反馈1-1_14.png"></image></view>
 <view wx:else> <image class="uploadimageclass" bindTap="uploadfbphotoFirst" src="{{fbphotoFirst}}"></image></view>

 <view wx:if="{{fbphotoFirst==''}}">
 <image class="uploadimageclass" bindTap="uploadfbphotoSecend" src="../../../image/信息反馈/信息反馈1-1_14.png"></image></view>
 <view wx:else> <image class="uploadimageclass" bindTap="uploadfbphotoSecend" src="{{fbphotoSecend}}"></image></view>

 <view wx:if="{{fbphotoFirst==''}}">
 <image class="uploadimageclass" bindTap="uploadfbphotothird" src="../../../image/信息反馈/信息反馈1-1_14.png"></image></view>
  <view wx:else> <image class="uploadimageclass" bindTap="uploadfbphotothird" src="{{fbphotothird}}"></image></view>-->

相关文章:

  • 2021-11-16
  • 2022-01-06
  • 2021-08-23
  • 2022-12-23
  • 2021-11-28
  • 2021-04-25
  • 2021-08-13
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
  • 2021-12-17
  • 2021-05-29
相关资源
相似解决方案