-
-
Notifications
You must be signed in to change notification settings - Fork 126
Closed
Labels
pending triageissue: pending triageissue: pending triage
Description
Describe the bug
文档上有这样一句话【如果设置 options.manual = true,则初始化不会启动轮询,需要通过 run/runAsync 触发开始。】
想请问一下 是run的时候就生成一个专门的定时器 还是总共只有一个定时器 run条件改变的时候 内部运行run最后一次的呢?
比如有俩个场景:
场景1:我查询接口,需求要求每30s刷新一次获取最新数据,我可以直接使用useRequest的轮询吗?如果可以,那如果我点击了查询(此时有查询条件),此时是生成2个定时器 还是 1个定时器轮询最后一次条件呢
场景2:我有个查询枚举的接口,需求要求每30s刷新一次获取最新的,此时我是这样的run(枚举A) run(枚举B) 并在onsuccess里面处理的并赋值 轮询又是怎样的呢 还是说 像这种情况 是必须需要使用多个useRequest来支持一个枚举接口的呢?
望回复。。。
Steps to reproduce
No response
System Info
vue3Used Package Manager
npm
Validations
- Follow our Code of Conduct.
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a VueHooks Plus issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
pending triageissue: pending triageissue: pending triage