[youzan/vant-weapp]var-toast VM99619:1 未找到 van-toast 节点,请确认 selector 及 context 是否正确

2024-07-04 238 views
8

注意:请按照下面的模板来新建 issue,不规范的 issue 会被立即关闭.

描述一下问题 使用van-toast的时候 VM99619:1 未找到 van-toast 节点,请确认 selector 及 context 是否正确

截图 如果是 UI 问题,请提供具体截图

环境

  • 设备: macPro
  • 基础库版本:
  • Vant Weapp 版本: v0.4.9

回答

3

2018-12-19 12 05 50

8

请问是怎么解决的呀?我也遇到了同样的问题

9

同求

0

bindtap名字不对

在 2019-01-19 22:18:53,maojindao55 notifications@github.com 写道:

同求

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

8

都是在页面上忘了加<van-toast id="van-toast" />

7

确实

1

toast能不能在组件内使用?我在组建内调用toast,加了,引入也没问题,但是还是出错,未找到toast节点

3

同问???

6

得在引入Component组件的根级Page页引入toast。。根级页的json里引入van-toast,再在wxml中加。。。

8

好的,谢谢,这边解决了,我这边和你说的不一样的地方就是 “得在引入组件组件的根级页面引入toast”,但是引入toast我这里是在component引入的

7

toast组件context参数指定为this,即context: this就可以了