网站介绍:文章浏览阅读7.7w次,点赞14次,收藏64次。前言之前有一篇博文介绍了小程序中模板template的使用。在使用的时候,虽然可以实现与组件相同的显示功能,但是template没有自己的生命周期,在操作模板上的控件时,事件的传递不好处理,而这些不方便都可以通过组件component来代替,先看一波效果图。 实现1.创建component组件首先如上图创建components文件夹,home-item就是最上面效果图的条..._wx.creategamecomponent
- 链接地址:https://blog.csdn.net/qq_17470165/article/details/81211923
- 链接标题:微信小程序自定义组件Component的使用_wx.creategamecomponent-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:8843
- 网站标签:wx.creategamecomponent