引入最新(2021年08月11日 11:25)vant组件,编译运行报错 Unknown custom element: <include>
- Dominant language
- JavaScript
- Stars
- 41.6k
- Forks
- 3.7k
- Avg merge
- 7h 6m
- Merged PRs (30d)
- 6
Description
**问题描述**
[问题描述:尽可能简洁清晰地把问题描述清楚]
引入最新的vant组件,编译运行报错。
https://github.com/youzan/vant-weapp

**复现步骤**
[复现问题的步骤]
1. 下载 https://github.com/youzan/vant-weapp 的 dist 文件(2021年08月11日 11:25)
2. 放入 `wxcomponents`
3. 引入 "van-field": "/wxcomponents/vant/field/index"
4. 使用 van-field
```
```
5. yarn run dev:h5
6. 到对应页面看到控制台报错
```
chunk-vendors.js:29671 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> at wxcomponents/vant/field/index.vue
at pages/login/index.vue
```
[或者可以直接贴源代码]
**预期结果**
[使用简洁清晰的语言描述你希望生效的预期结果]
正常使用组件
**实际结果**
[这里请贴上你的报错截图或文字]
```
chunk-vendors.js:29671 [Vue warn]: Unknown custom element: - did you register the component correctly? For recursive components, make sure to provide the "name" option.
found in
---> at wxcomponents/vant/field/index.vue
at pages/login/index.vue
```
**系统信息:**
- 发行平台: H5平台
- 操作系统: chrome
- HBuilderX版本:无
- uni-app版本:
uni-app v3.1.22
uni-app cli v2.0.0-31920210709003
- 设备信息:MacBook Pro (13-inch, 2017, Two Thunderbolt 3 ports)
**补充信息**
[可选]
[根据你的分析,出现这个问题的原因可能在哪里?]
uni-app 编译wx文件生成vue文件时,没有兼容微信的 include 组件

以前 vant 用的 是 textarea 的,现在改用 include 了
Contributor guide
Assessment
This issue has not been assessed yet.