youzan / vant-weapp

轻量、可靠的小程序 UI 组件库
https://vant.pro/vant-weapp/
MIT License
17.8k stars 3.48k forks source link

[Bug Report] 微信小程序中 van-row报错 #5763

Closed qc233 closed 7 months ago

qc233 commented 7 months ago

重现链接

index.wxml

<van-row>
     <van-tabs class="tab-box" active="a">
        <van-tab class="tab-card"  title="湿度" name="b">内容 2</van-tab>
    </van-tabs>
</van-row>

Vant Weapp 版本

1.11.4

描述一下你遇到的问题。

主要是

index.wxml

<van-row>
     <van-tabs class="tab-box" active="a">
        <van-tab class="tab-card"  title="湿度" name="b">内容 2</van-tab>
    </van-tabs>
</van-row>

去除van-row标签或van-tab标签则不报错 否则就会出现

TypeError: Cannot read property '0' of undefined
    at e (wxml.js?t=wechat&s=1712849076493&v=a9044f06fc01835b0cff28ebd531ac44:1)
    at l (wxml.js?t=wechat&s=1712849076493&v=a9044f06fc01835b0cff28ebd531ac44:1)
    at m0 (<anonymous>:34:4)
    at <anonymous>:52:1
    at so (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at t.ko.create (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at Function.w.prepare (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at Function.w._advancedCreate (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at c.createComponent (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at co (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
TypeError: Cannot read property '0' of undefined
    at e (wxml.js?t=wechat&s=1712849076493&v=a9044f06fc01835b0cff28ebd531ac44:1)
    at l (wxml.js?t=wechat&s=1712849076493&v=a9044f06fc01835b0cff28ebd531ac44:1)
    at m0 (<anonymous>:34:4)
    at <anonymous>:52:1
    at so (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at t.ko.create (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at Function.w.prepare (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at Function.w._advancedCreate (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at c.createComponent (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)
    at co (WASubContext.js?t=wechat&s=1712849076493&v=3.4.1:1)(env: Windows,mp,1.06.2401020; lib: 3.4.1)
Fri Apr 12 2024 00:05:10 GMT+0800 (中国标准时间) Page route 错误(system error)
routeDone with a webviewId 35 that is not the current page(env: Windows,mp,1.06.2401020; lib: 3.4.1)

重现步骤

在微信小程序开发工具中编译就会出现上述错误

设备/浏览器

No response

qc233 commented 7 months ago

另外

<van-row>
</van-row>

<van-tabs class="tab-box" active="a">
    <van-tab class="tab-card"  title="湿度" name="b">内容 2</van-tab>
</van-tabs>

这样写也会报同样的错误

johnsonwong666 commented 7 months ago

https://developers.weixin.qq.com/s/ORrhjomZ7MQn

控制台好像没有看见你提供的错误