Comments (1)
你应该是监听不到 getuserinfo 事件吧,这个和 ant-mobile 那些应该没啥关系,是 react 自己做了限制,无法从标准节点里监听 customEvent。
处理手段大致有两种:
1、是手动使用 addEventListener/removeEventListener 来处理事件监听/移除
2、使用 kbone 提供的批量监听事件的语法糖:https://wechat-miniprogram.github.io/kbone/docs/guide/advanced.html#%E6%89%B9%E9%87%8F%E8%AE%BE%E7%BD%AE%E4%BA%8B%E4%BB%B6%E7%9B%91%E5%90%AC%E5%99%A8
第二个问题,如果是要用小程序原生的实现,要加配置:
上拉加载 - https://wechat-miniprogram.github.io/kbone/docs/config/#global-reachbottom
下拉刷新 - https://wechat-miniprogram.github.io/kbone/docs/config/#global-pulldownrefresh
配在 global 里是所有页面通配,配在 pages 里则可以指定页面配置。然后 window 上走正常的事件监听即可:
如果是 Web 端,就要自己实现了,kbone 不处理任何 Web 端的代码。
from kbone-template-react.
Related Issues (8)
- 是否支持tsx? HOT 1
- 是否支持 material-ui 呢 HOT 2
- 是否支持React-Router和Redux? HOT 1
- 我把counter后缀改成jsx后打包就报错了,请问下怎么处理? HOT 1
- 增加miniprogramRoot和cloudfunctionRoot后遇到问题 HOT 1
- 不能新建 .jsx 文件 HOT 1
- 现在多端框架这么多,kbone的意义何在? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kbone-template-react.