在页面的json文件内引用自定义组件,格式如下:
/** * myTag 自定义组件名称 * path/to/the/custom/component 自定义组件所在路径 **/ { "usingComponents": { "myTag": "path/to/the/custom/component" } }
在页面的wxml内调用该组件:
<myTag></myTag>
【自定义组件】引用组件
原文:https://www.cnblogs.com/wm218/p/9952419.html