关于Vue3 Vite 无法接入F2问题,一点解决方法
- Dominant language
- JavaScript
- Stars
- 8k
- Forks
- 637
- PR merge metrics
- No merged PRs in 30d
Description
- [ ] I have searched the [issues](https://github.com/antvis/f2/issues) of this repository and believe that this is not a duplicate.
### Reproduction link
[https://github.com/antvis/F2/issues/1742](https://github.com/antvis/F2/issues/1742)
### Steps to reproduce
"vue": "^3.2.47",
"vant": "^4.0.11",
"@antv/f2": "^4.0.41",
根据文档中的示例,跑不通, 各种提示问题。
因为在大概2周前使用vue3 成功接入,感觉接入F2应该是没有问题。
有看到第二个例子 https://github.com/antvis/FEngine/tree/master/packages/f-vue/examples/vite
发现一个问题 在网站文档引入的是@antv/f-vue
而在 上面的例子中却引入的是 @antv/f2-vue
更改后正确使用,各位使用F2 4.X的可以尝试一下
| Environment | Info |
|---|---|
| f2 | 4.0.41 |
| System | windows 11 |
| Browser | chrome |
Contributor guide
Research direction
Compare the Vue 3/Vite documentation example with the linked FEngine Vite example and the reproduction issue. Check the documented package import against the working F2 4.x example; done means the documentation uses the correct package and the example runs with the listed dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vite
- Domain
- data-visualization, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100