按照lin ui 官网的的toast开放函数的使用步骤:
1、 在页面json中添加"l-toast": “/miniprogram_npm/lin-ui/toast/index"
2、在wxml中定义
3、使用const toast = this.selectComponent(”#my-toast");
4、使用toast.linShow({
title: ‘温馨提示’
});
我想用lin-toast替换微信的showToast组件,但是在onCollect中使用linShow()函数报错,说linShow()不是一个函数,报错如下:``
VM4994 WAService.js:2 TypeError: toast.linShow is not a function
at vt.onCollect (post-detail.js? [sm]:46)
at Object.o.safeCallback (VM4994 WAService.js:2)
at VM4994 WAService.js:2
at s (VM4994 WAService.js:2)
at VM4994 WAService.js:2
at v (VM4994 WAService.js:2)
at VM4994 WAService.js:2
at VM4994 WAService.js:2
at i (VM8 asdebug.js:1)
at c (VM8 asdebug.js:1)(env: Windows,mp,1.05.2106300; lib: 2.17.0)代码
请教下老师?