在小程序中使用minui搭建组件的时候下图错误。该怎么解决呢!
1.通过min init [name]
安装组件之后,需要通过min build
进行编译
2.编译完之后,dist/packages中就会有编译好的文件
3.进行引入,在api:https://meili.github.io/min/docs/min-cli/third-project/using/index.html
中有使用组件的方法
- 准备在 pages 目录下的 home 页面使用自定义组件(下面都是以 home 页面举例)
your_weapp_project
├──pages
| ├── home
| ├── index.js
| | ├── index.wxml
| | ├── index.wxss
| | ├── index.json
- 进入 pages/home/index.json 文件中进行引用声明,此时需要提供每个自定义组件的标签名和对应的自定义组件文件路径:
{
"enablePullDownRefresh": true,
"usingComponents": {
"wxc-notice": "../../dist/packages/@minui/wxc-notice/dist/index"
}
}