touchWX 自定义组件以及传值
生活随笔
收集整理的這篇文章主要介紹了
touchWX 自定义组件以及传值
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
創建如圖文件
index.wxc:
<template><view class="wx-test" bindtap="handleTap">{{ msg }}{{dataIndex}}</view> </template> <script>export default {properties: {dataIndex: {type: String,value: 'default value',}},data: {msg: 'This is a test msg!'},methods: {handleTap() {var a=123this.triggerEvent('myclick',a);}}} </script> <style lang="less">.wx-test {color: #f00;} </style>父組件:
?
轉載于:https://www.cnblogs.com/smzd/p/9223830.html
總結
以上是生活随笔為你收集整理的touchWX 自定义组件以及传值的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 枚举命名规范_UE4 C++基础教程 -
- 下一篇: touchWX使用 echarts