Tencent / wepy

小程序组件化开发框架
https://wepyjs.gitee.io/wepy-docs/
Other
22.5k stars 3.05k forks source link

wepy自定义组件可以在usingComponents中引入吗 #2122

Open SatanZS opened 5 years ago

SatanZS commented 5 years ago

Description

使用wepy写的自定义组件, 想把它变成全局的,也就是放在usingComponents里面,但是一直提示组件不存在

Environment

Reproduce

写一个自定义组件, 放到usingComponents里面,然后在页面中直接使用定义的标签

Observed Results

提示Component is not found in path

Expected Results

不需要再页面中单独引用,因为想作为全局组件使用

Relevant Code / Logs


  // TODO(you): code or logs here to reproduce the problem
  // 可以使用小程序代码片段功能,方便其它人帮助你定位代码问题
  // 详情可参考这里:https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html
  ```
Jialufeng commented 5 years ago

custom-tab-bar export default class Index extends wepy.component {

} 遇到同样问题 Error: Component is not found in path "custom-tab-bar/index"

fitcong commented 5 years ago

现在不支持这么用

penjj commented 5 years ago

@Jialufeng 请问这个问题你解决了嘛?