mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs: add unplugin-vue-components tip (#11251)
This commit is contained in:
parent
1f917e9a2a
commit
839bcd8928
@ -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
|
||||||
|
@ -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) 仓库下反馈。
|
||||||
|
|
||||||
## 在框架中使用
|
## 在框架中使用
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user