Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo示例的bind:tap事件无法触发函数 #127

Open
YangyuBaobao opened this issue Jan 18, 2024 · 8 comments
Open

demo示例的bind:tap事件无法触发函数 #127

YangyuBaobao opened this issue Jan 18, 2024 · 8 comments
Labels
question Further information is requested

Comments

@YangyuBaobao
Copy link

项目:glass-easel-miniprogram-template

pages/index/index.wxml:
image

pages/index/index.ts
image

问题:点击Hello world!并没有出发tap事件绑定的函数helloTap(),控制台也没有对应输出
1705566609220

@YangyuBaobao YangyuBaobao changed the title demo示例的bind:tap无法调用函数 demo示例的bind:tap事件无法触发函数 Jan 18, 2024
@LastLeaf
Copy link
Member

直接用原本的项目代码编译的吗?我自己重编了个看起来没问题。

@YangyuBaobao
Copy link
Author

直接用原本的项目代码编译的吗?我自己重编了个看起来没问题。

有node和npm版本限制吗,我的版本:
node: 18.18.0
npm: 9.8.1

@LastLeaf
Copy link
Member

$ node -v
v16.20.0
$ npm -v
8.19.4

你是编了整个 glass-easel 项目还是单独编 template ?

@YangyuBaobao
Copy link
Author

单独编的template,应该怎么操作呢?

@LastLeaf
Copy link
Member

单独编的template,应该怎么操作呢?

这我试过应该也没问题的。

你试试直接把 template 单独拉到一个新位置重新 npm install 和 npm run build ?

@YangyuBaobao
Copy link
Author

单独拉到一个新位置重新 npm install 和 npm run build ,并且node和npm版本保持一致了,在浏览器中依旧没有效果
image
1706097692640

@YangyuBaobao
Copy link
Author

image

@LastLeaf
Copy link
Member

试一下 bind 其他的事件能不能 console log 出什么? touchstart touchend mousedown mouseup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants