收藏
回答

xr-ar-tracke 多张图片识别,循环数组写法?

<xr-node wx:for="{{markerImg}}" wx:key="item.id">   

        <xr-ar-tracker id="ar-tracker" mode="Marker" src="{{item.src}}" bind:ar-tracker-state="handleARTrackerState">

        </xr-ar-tracker>

      </xr-node> 这种识别不了

markerImg数组下的src提取单个变量,分别以markerImgitem0 ~ markerImgitem4,用以下方法可以识别,不知道什么原因

 <xr-ar-tracker id="ar-trackermode="Markersrc="{{markerImgitem0}}" bind:ar-tracker-state="handleARTrackerState">

      </xr-ar-tracker>  

      <xr-ar-tracker id="ar-trackermode="Markersrc="{{markerImgitem1}}" bind:ar-tracker-state="handleARTrackerState">

      </xr-ar-tracker> 

      <xr-ar-tracker id="ar-trackermode="Markersrc="{{markerImgitem2}}" bind:ar-tracker-state="handleARTrackerState">

      </xr-ar-tracker> 

      <xr-ar-tracker id="ar-trackermode="Markersrc="{{markerImgitem3}}" bind:ar-tracker-state="handleARTrackerState">

      </xr-ar-tracker> 



回答关注问题邀请回答
收藏
登录 后发表内容