1 //子組件中 2 Component({ 3 methods:{ 4 addInterval:function(){ 5 ..... 6 } 7 } 8 }) 9 //page中 10 //在wxml中引用組件時候,給組件得到屬性加上 id=mycircle 11 //在js中,可以傳遞調用事件 12 this.selectComponent("#mycircle).addInterval();
1 //子組件中 2 Component({ 3 methods:{ 4 addInterval:function(){ 5 ..... 6 } 7 } 8 }) 9 //page中 10 //在wxml中引用組件時候,給組件得到屬性加上 id=mycircle 11 //在js中,可以傳遞調用事件 12 this.selectComponent("#mycircle).addInterval();
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。