收藏
回答

如何捕获小程序分包组件未找到的异常?

分包组件未成功引入,调用时只在console里提示以下信息,想问下如何捕获到这种异常

[WXML Runtime warning] ./base.wxml

 Template `tmpl_0_xx` not found.

  789 |   <view hover-class="{{xs.b(i.p1,'none')}}" hover-stop-propagation="{{xs.b(i.p4,!1)}}" hover-start-time="{{xs.b(i.p2,50)}}" hover-stay-time="{{xs.b(i.p3,400)}}" bindtouchstart="eh" bindtouchmove="eh" bindtouchend="eh" bindtouchcancel="eh" bindlongpress="eh" animation="{{i.p0}}" bindanimationstart="eh" bindanimationiteration="eh" bindanimationend="eh" bindtransitionend="eh" style="{{i.st}}" class="{{i.cl}}" bindtap="eh"  id="{{i.uid||i.sid}}" data-sid="{{i.sid}}">

  790 |     <block wx:for="{{i.cn}}" wx:key="sid">

> 791 |       <template is="{{xs.a(c, item.nn, l)}}" data="{{i:item,c:c+1,l:xs.f(l,item.nn)}}" />

      |                    ^

  792 |     </block>

  793 |   </view>

  794 | </template>

WXMLRT_$gwx_XC_7:./base.wxml:template:791:20: Template `tmpl_0_xx` not found.

回答关注问题邀请回答
收藏

1 个回答

  • 智能回答 智能回答 本次回答由AI生成
    2025-11-10
    有用
登录 后发表内容