Skip to content

Invalid watch source #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
7 tasks done
Preyou opened this issue Apr 16, 2025 · 2 comments
Closed
7 tasks done

Invalid watch source #270

Preyou opened this issue Apr 16, 2025 · 2 comments
Labels
pending triage issue: pending triage

Comments

@Preyou
Copy link

Preyou commented Apr 16, 2025

Describe the bug

控制台出现警告

Image

我调试了下,问题出在这里

Image

Steps to reproduce

在没传递throttleWait时会有警告。

System Info

ShortcutMain.vue:9 
 [Vue warn]: Invalid watch source:  undefined A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types. 
  at <ShortcutMain onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView > 
  at <LayoutContent embedded="" > 
  at <Layout has-sider="" class="h-full" > 
  at <AgentLayout class="h-full" > 
  at <Layout class="size-screen" > 
  at <AgentMain onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView > 
  at <Anonymous > 
  at <ModalProvider > 
  at <Anonymous> 
  at <MessageProvider duration=3000 keepAliveOnHover=false placement="top"  ... > 
  at <NpGlobalMessage> 
  at <Anonymous> 
  at <NotificationProvider scrollable=true placement="top-right" keepAliveOnHover=false  ... > 
  at <NpGlobalNotification> 
  at <Anonymous> 
  at <DialogProvider injectionKey=undefined to=undefined > 
  at <NpGlobalDialog> 
  at <Anonymous> 
  at <LoadingBarProvider to=undefined theme=undefined themeOverrides=undefined  ... > 
  at <NpGlobalLoadingBar> 
  at <Anonymous install= 
(4) [{…}, {…}, {…}, {…}]
 > 
  at <NpGlobalProvider > 
  at <Element class="size-screen" > 
  at <Anonymous key=1 > 
  at <ConfigProvider locale= 
{name: 'zh-CN', global: {…}, Popconfirm: {…}, Cascader: {…}, Time: {…}, …}
 date-locale= 
{name: 'zh-CN', locale: {…}}
 theme-overrides= 
{}
 > 
  at <App>

Used Package Manager

pnpm

Validations

@Preyou Preyou added the pending triage issue: pending triage label Apr 16, 2025
@NelsonYong
Copy link
Contributor

@Preyou 感谢你的反馈。近期的 beta 版本我在进行节流函数的重构。以上问题是 watch 的数组中只能是响应式的值,因此我对其进行了修复,请更新 2.3.0-beta.8 修复版本。

@NelsonYong
Copy link
Contributor

如果后续存在疑问,请 reopen 这个 issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending triage issue: pending triage
Projects
None yet
Development

No branches or pull requests

2 participants