canvas父级标签通过wx:if控制后,canvas不显示了?

小程序 文章 4 天前 7 0 全屏看文

canvas父级标签通过wx:if控制后,canvas不显示了?After the canvas parent label is controlled by wx:if, the canvas is not displayed?

canvas父级标签通过wx:if控制后,canvas不显示了?

canvas父级标签通过wx:if或hidden控制后,canvas不显示了?

<view hidden="{{!isModal}}" class="popup">  <view class="flex-column popup_ranking">    <text class="popup_ranking_name">{{rankDetail.title}}</text>    <text class="popup_ranking_title">傻B行为指数榜</text>    <view class="flex-column popup_vote">      <text>{{rankDetail.grade}}</text>      <text>综合榜</text>    </view>  </view>  <view class="flex-space canvas_case">    <view class="canvas">      <ec-canvas id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas>    </view>    <view class="canvas_tital">      <text class="tital_A">没做过</text>      <text class="tital_B">偶尔做</text>      <text class="tital_C">经常做</text>    </view>  </view>  <button class="btn_detail" hover-class="btn_like" catchtap="toDetail">查看详情</button></view>

following the wx:ifor hiddencontrol of the canvasfather, canvasvasvasvasvas has not shown? Have you seen hidden=? Dual Regular practice *

回答:

Charlie:
isModal

值是什么

圣殿骑士:

是的,建议用hidden的办法隐藏,用if容易导致对象丢失

brave:

没看懂你的问题,这个表现不对?

Qiu (吉²):在canvas的父级标签加上wx:if或hidden后,canvas就不能显示了。(<view hidden="{{!isModal}}" class="popup">)

-EOF-