AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
~~~ //wxml //子组件 <view class="like" catchtap="onLike"> <text>{{count}}</text> </view> ~~~ ~~~ //js onLike(event){ var like = this.properties.like; var count = this.properties.count; if(like){ this.setData({ like:false, count:count-1 }) }else{ this.setData({ like:true, count:count+1 }) } /* 自定义事件 */ var behavior = this.properties.like?"like":"cancel"; this.triggerEvent('like',{ behavior }) ~~~ ~~~ //父组件 <v-like bind:like="onLike"></v-like> ~~~ ~~~ //js onLike(e){ console.log(e.detail); } ~~~