问题模块 | 框架类型 | 问题类型 | API/组件名称 | 终端类型 | 微信版本 | 基础库版本 |
---|---|---|---|---|---|---|
API和组件 | 小程序 | Bug | Components | 工具 | 6.6.5 | 1.9.93 |
- 当前 Bug 的表现(可附上截图)
- 相关代码
#组件的index.js(/components/entrance/index.js) Component({ properties: { title: { type: String } }, data: {}, methods: { labeltap: function () { console.log( "label被点击了一下!" ) } } }) #组件的index.json (/components/entrance/index.json) { "component" : true } #组件的index.wxml (/components/entrance/index.wxml) <view> <checkbox id= "checkbox" checked= "" ></checkbox> <label for = "checkbox" class= "label" bindtap= "labeltap" > {{title}} </label> </view> ----------使用组件--------- #index.json { "navigationBarTitleText" : "" , "usingComponents" : { "entrance" : "/components/entrance/index" } } # index.wxml <view> <entrance> <view>这里是插入到组件slot中的内容</view> </entrance> </view> |
困惑点:
errorCode出现得没有指示性,不明所以。。
这个使用自定义组件的过程,到底哪里出问题呢?
网友回复
项xx:
我也碰到了, 有解决方案么?