微信小程序-页面访问组件数据和方法
首先,创建演示案例的组件,c-demo,在给我们的组件添加一个按钮,并且给这个按钮绑定一个点击事件:<!-- c-demo2.wxml --> <button bindtap="onCDemoTap" type="primary" > 我是c-demo按钮 </button>JS:// components/c-demo2/c-demo2.js Com...
微信小程序:页面调用组件内方法
组件 custom-componentComponent({ methods: { sayHello() { console.log('hello'); }, }, });页面调用组件方法<custom-component id="custom-component"></custom-component>// 获取组件实例对象,并调用子...
本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。
微信更多页面相关
产品推荐
mPaaS 移动开发平台
mPaaS 源于蚂蚁集团金融科技,为 App 开发、测试、运营及运维提供云到端的一站式解决方案,致力于提供高效、灵活、稳定的移动研发、管理平台。 官网地址:https://www.aliyun.com/product/mobilepaas/mpaas
+关注