docs: add unplugin-vue-components tip (#11251)

This commit is contained in:
neverland 2022-11-13 10:46:49 +08:00 committed by GitHub
parent 1f917e9a2a
commit 839bcd8928
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -213,6 +213,11 @@ import 'vant/es/image-preview/style';
> Tip: "Full Import" and "On-demand Import" should not be used at the same time, otherwise it will lead to problems such as code duplication and style overrides. > Tip: "Full Import" and "On-demand Import" should not be used at the same time, otherwise it will lead to problems such as code duplication and style overrides.
#### Tips
- "Full Import" and "On-demand Import" should not be used at the same time, otherwise it will lead to problems such as code duplication and style overrides.
- unplugin-vue-components is not officially maintained by Vant. If you encounter issues when using this plugin, please feedback to [antfu/unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) repository.
## With Frameworks ## With Frameworks
### Use Vant in Nuxt 3 ### Use Vant in Nuxt 3

View File

@ -218,7 +218,10 @@ import 'vant/es/image-preview/style';
你可以在项目的入口文件或公共模块中引入以上组件的样式,这样在业务代码中使用组件时,便不再需要重复引入样式了。 你可以在项目的入口文件或公共模块中引入以上组件的样式,这样在业务代码中使用组件时,便不再需要重复引入样式了。
> 提示:在单个项目中不应该同时使用「全量引入」和「按需引入」,否则会导致代码重复、样式错乱等问题。 #### 使用提示
- 请避免同时使用「全量引入」和「按需引入」这两种引入方式,否则会导致代码重复、样式错乱等问题。
- unplugin-vue-components 并不是 Vant 官方维护的插件,如果在使用过程中遇到问题,建议优先到 [antfu/unplugin-vue-components](https://github.com/antfu/unplugin-vue-components) 仓库下反馈。
## 在框架中使用 ## 在框架中使用

View File

@ -195,6 +195,8 @@ export default defineComponent({
const { offsetX, offsetY } = touch; const { offsetX, offsetY } = touch;
const deltaTime = Date.now() - touchStartTime; const deltaTime = Date.now() - touchStartTime;
// Same as the default value of iOS double tap timeout
const TAP_TIME = 250; const TAP_TIME = 250;
const TAP_OFFSET = 5; const TAP_OFFSET = 5;