选项
首页首页 Skill 网页开发 vue-debug-guides

vue-debug-guides

vuejs-ai/skills vuejs-ai/skills

通过针对性的调试指南,诊断并修复 Vue 3 的运行时错误、警告、异步失败以及 SSR/数据注入问题。

...展开全部
0
更新时间 2026-09-28

Vue 3 针对运行时问题、警告、异步失败和数据加载错误的调试与错误处理。 有关开发最佳实践和常见陷阱,请参阅vue-best-practices。

响应式

  • 排查意外的重新渲染和状态更新 → 参见 reactivity-debugging-hooks
  • 由于缺少 .value 访问而导致 ref 值未更新 → 参见 ref-value-access
  • 解构响应式对象后状态停止更新 → 参见 reactive-destructuring
  • 数组、Map 或 Set 中的 ref 未被解包 → 参见 refs-in-collections-need-value
  • 嵌套的 ref 在模板中渲染为 [object Object] → 参见 template-ref-unwrapping-top-level
  • Reactive 代理的身份比较总是返回 false → 参见 reactivity-proxy-identity-hazard
  • 第三方实例在代理后出现故障 → 参见 reactivity-markraw-for-non-reactive
  • 监听器在每个 tick 中意外仅触发一次 → 参见 reactivity-same-tick-batching

计算属性

  • 计算属性获取器意外触发变异或请求 → 参见 computed-no-side-effects
  • 修改计算值会导致更改消失 → 参见 computed-return-value-readonly
  • 计算值在条件逻辑之后从未更新 → 参见 computed-conditional-dependencies
  • 对数组进行排序或反转会破坏原始状态 → 参见 computed-array-mutation
  • 向计算属性传递参数失败 → 参见 computed-no-parameters

监听器

  • 异步操作被过期数据覆盖 → 参见 watch-async-cleanup
  • 在异步回调中创建监听器 → 参见 watch-async-creation-memory-leak
  • 监听器从未针对响应式对象属性触发 → 参见 watch-reactive-property-getter
  • 异步 watchEffect 在 await 之后遗漏依赖项 → 参见 watcheffect-async-dependency-tracking
  • 监听器回调中的 DOM 读取数据已过期 → 参见 watch-flush-timing
  • 深度监听器报告相同的新旧值 → 参见 watch-deep-same-object-reference
  • watchEffect 在模板引用更新之前执行 → 参见 watcheffect-flush-post-for-refs

组件

  • 子组件抛出“找不到组件”错误 → 参见 local-components-not-in-descendants
  • 自定义组件上未触发点击监听器 → 参见 click-events-on-components
  • 父组件无法在脚本初始化中访问子组件的 ref 数据 → 参见 component-ref-requires-defineexpose
  • HTML 模板解析破坏了 Vue 组件语法 → 参见 in-dom-template-parsing-caveats
  • 因命名冲突导致渲染了错误的组件 → 参见 component-naming-conflicts
  • 父组件样式不应用于多根组件 → 参见 multi-root-component-class-attrs

Props 与 Emits

  • 在 `defineProps` 中引用的变量会导致错误 → 参见 prop-defineprops-scope-limitation
  • 组件发射未声明的事件导致警告 → 参见 declare-emits-for-documentation
  • 在函数或条件语句内部使用 `defineEmits` → 参见 `defineEmits-must-be-top-level`
  • `defineEmits` 同时包含类型参数和运行时参数 → 参见 defineEmits-no-runtime-and-type-mixed
  • 原生事件监听器对点击无响应 → 参见 native-event-collision-with-emits
  • 点击时组件事件触发两次 → 参见 undeclared-emits-double-firing

模板

  • 包含语句时出现模板编译错误 → 参见 template-expressions-restrictions
  • “无法读取 undefined 的属性”运行时错误 → 参见 v-if-null-check-order
  • 动态指令参数无法正常工作 → 参见 dynamic-argument-constraints
  • v-else 元素总是无条件渲染 → 参见 v-else-must-follow-v-if
  • 将 v-if 与 v-for 混合使用会导致优先级错误和迁移失败 → 参见 no-v-if-with-v-for
  • 模板函数调用修改状态会导致不可预测的重新渲染错误 → 参见 template-functions-no-side-effects
  • 循环中的子组件显示未定义的数据 → 参见 v-for-component-props
  • 对数组进行排序或反转后,数组顺序发生变化 → 参见 v-for-computed-reverse-sort
  • 列表项意外消失或状态发生交换 → 参见 v-for-key-attribute
  • 范围迭代中出现“偏移一”错误 → 参见 v-for-range-starts-at-one
  • v-show 或 v-else 在模板元素上失效 → 参见 v-show-template-limitation

模板引用

  • 当元素被条件隐藏时,引用变为 null → 参见 template-ref-null-with-v-if
  • 循环中 Ref 数组的索引与数据数组不匹配 → 参见 template-ref-v-for-order
  • 重构模板引用名称会导致代码中出现无提示的错误 → 参见 use-template-ref-vue35

表单与 v-model

  • 使用 v-model 时表单初始值未显示 → 参见 v-model-ignores-html-attributes
  • textarea 内容更改后 ref 未更新 → 参见 textarea-no-interpolation
  • iOS 用户无法选择下拉菜单的首个选项 → 参见 select-initial-value-ios-bug
  • 父组件和子组件的值不一致 → 参见 define-model-default-value-sync
  • 对象属性更改未同步到父组件 → 参见 definemodel-object-mutation-no-emit
  • 中文/日文输入时实时搜索/验证失效 → 参见 v-model-ime-composition
  • 数字输入框返回空字符串而非零 → 参见 v-model-number-modifier-behavior
  • 表单提交时自定义复选框值未被提交 → 参见 checkbox-true-false-value-form-submission

事件与修饰符

  • 链式调用多个事件修饰符会导致意外结果 → 参见 event-modifier-order-matters
  • 键盘快捷键在配合系统修饰键时无法触发 → 参见 keyup-modifier-timing
  • 键盘快捷键在意外的修饰键组合下触发 → 参见 exact-modifier-for-precise-shortcuts
  • 同时使用“被动”和“阻止”修饰符会导致事件行为异常 → 参见 no-passive-with-prevent

生命周期

  • 未移除的事件监听器会导致内存泄漏 → 参见 cleanup-side-effects
  • 组件挂载前无法访问 DOM → 参见 lifecycle-dom-access-timing
  • 状态变更后 DOM 读取返回过时值 → 参见 dom-update-timing-nexttick
  • 服务器端渲染(SSR)与客户端加载存在差异 → 参见 lifecycle-ssr-awareness
  • 异步注册的生命周期钩子永远不会执行 → 参见 lifecycle-hooks-synchronous-registration

插槽

  • 在插槽内容中访问子组件数据会返回未定义值 → 参见 slot-render-scope-parent-only
  • 混合使用命名槽和作用域槽会导致编译错误 → 参见 slot-named-scoped-explicit-default
  • 在原生 HTML 元素上使用 v-slot 会导致编译错误 → 参见 slot-v-slot-on-components-or-templates-only
  • 隐式默认插槽行为导致内容位置异常 → 参见 slot-implicit-default-content
  • 作用域插槽属性缺少预期的名称属性 → 参见 slot-name-reserved-prop
  • 包装组件破坏了子组件的插槽功能 → 参见 slot-forwarding-to-child-components

Provide/Inject

  • 在异步操作后调用 `provide` 会无声失败 → 参见 provide-inject-synchronous-setup
  • 追踪提供值的来源 → 参见 provide-inject-debugging-challenges
  • 提供者发生变化时,注入的值未更新 → 参见 provide-inject-reactivity-not-automatic
  • 多个组件共享同一个默认对象 → 参见 provide-inject-default-value-factory

属性

  • 内部和 fallthrough 事件处理程序均被执行 → 参见 attrs-event-listener-merging
  • 显式属性被传递值覆盖 → 参见 fallthrough-attrs-overwrite-vue3
  • 在包装器中属性应用到了错误的元素 → 参见 inheritattrs-false-for-wrapper-components

可组合函数

  • 在 setup 上下文之外或异步调用可组合组件 → 参见 composable-call-location-restrictions
  • 当输入发生变化时,可组合组件的响应式依赖项未更新 → 参见 composable-tovalue-inside-watcheffect
  • 可组合组件意外修改外部状态 → 参见 composable-avoid-hidden-side-effects
  • 解构可组合组件的返回值会导致反应性意外中断 → 参见 composable-naming-return-pattern

组合 API

  • 异步操作后生命周期钩子无提示失败 → 参见 composition-api-script-setup-async-context
  • 父组件的 ref 无法访问暴露的属性 → 参见 define-expose-before-await
  • 函数式编程模式破坏了预期的 Vue 响应式行为 → 参见 composition-api-not-functional-programming
  • React Hook 的思维模式导致 Composition API 使用错误 → 参见 composition-api-vs-react-hooks-differences

动画

  • 当 DOM 节点被复用时,动画无法触发 → 参见 animation-key-for-rerender
  • 在高负载下,TransitionGroup 列表的更新感觉有延迟 → 参见 animation-transitiongroup-performance

TypeScript

  • 可变属性默认值会导致组件实例之间发生状态泄漏 → 参见 ts-withdefaults-mutable-factory-function
  • reactive() 的泛型类型导致 ref 解包不匹配 → 参见 ts-reactive-no-generic-argument
  • 模板引用在挂载前或 v-if 条件解除挂载后抛出 null 访问错误 → 参见 ts-template-ref-null-handling
  • 可选布尔属性默认行为为 false 而非 undefined → 参见 ts-defineprops-boolean-default-false
  • 导入的 defineProps 类型因无法解析或复杂的类型引用而失败 → 参见 ts-defineprops-imported-types-limitations
  • 在严格的 TypeScript 设置下,无类型的 DOM 事件处理程序会失败 → 参见 ts-event-handler-explicit-typing
  • 动态组件引用会触发响应式组件警告 → 参见 ts-shallowref-for-dynamic-components
  • 未进行类型缩窄的联合类型模板表达式无法通过类型检查 → 参见 ts-template-type-casting

异步组件

  • 使用 `defineAsyncComponent` 配置路由组件时,延迟加载设置错误 → 参见 async-component-vue-router
  • 加载组件时发生网络故障或超时 → 参见 async-component-error-handling
  • 组件重新激活后模板引用未定义 → 参见 async-component-keepalive-ref-issue

渲染函数

  • 状态变化后渲染函数的输出保持不变 → 参见 rendering-render-function-return-from-setup
  • 重复使用的 vnode 实例渲染不正确 → 参见 render-function-vnodes-must-be-unique
  • 字符串组件名称渲染为 HTML 元素 → 参见 rendering-resolve-component-for-string-names
  • 在 Vue 更新时访问 vnode 内部属性会导致错误 → 参见 render-function-avoid-internal-vnode-properties
  • Vue 2 渲染函数模式在 Vue 3 中会导致崩溃 → 参见 rendering-render-function-h-import-vue3
  • h() 中的插槽内容无法渲染 → 参见 rendering-render-function-slots-as-functions

KeepAlive

  • 嵌套的 Vue Router 路由会导致子组件被挂载两次 → 参见 keepalive-router-nested-double-mount
  • 将 KeepAlive 与 Transition 动画结合使用时内存增长 → 参见 keepalive-transition-memory-leak

过渡

  • JavaScript 过渡钩子在未调用 done 回调时卡住 → 参见 transition-js-hooks-done-callback
  • 内联列表元素的移动动画失败 → 参见 transition-group-flip-inline-elements
  • 列表项跳跃而非平滑动画 → 参见 transition-group-move-animation-position-absolute
  • Vue 2 到 Vue 3 的 TransitionGroup 包装器变更导致布局失效 → 参见 transition-group-no-default-wrapper-vue3
  • 嵌套过渡在结束前被中断 → 参见 transition-nested-duration
  • 可重用过渡包装器中作用域样式失效 → 参见 transition-reusable-scoped-style
  • RouterView 过渡在首次渲染时出现意外动画 → 参见 transition-router-view-appear
  • 混合使用 CSS 过渡和动画会导致时机问题 → 参见 transition-type-when-mixed
  • 快速切换过渡时遗漏了清理钩子 → 参见 transition-unmount-hook-timing

Teleport

  • DOM 中未找到 Teleport 目标元素 → 参见 teleport-target-must-exist
  • 传送的内容破坏了 SSR 数据加载 → 参见 teleport-ssr-hydration
  • 作用域样式未应用于传送内容 → 参见 teleport-scoped-styles-limitation

Suspense

  • 需要处理来自 Suspense 组件的异步错误 → 参见 suspense-no-builtin-error-handling
  • 在服务器端渲染中使用 Suspense → 参见 suspense-ssr-hydration-issues
  • 在 Suspense 环境下,异步组件加载/错误 UI 被忽略 → 参见 async-component-suspense-control

SSR

  • 服务器端渲染与客户端渲染生成的 HTML 存在差异 → 参见 ssr-hydration-mismatch-causes
  • 用户状态在请求之间通过共享的单例存储发生泄漏 → 参见 state-ssr-cross-request-pollution
  • 仅限浏览器的 API 会导致通用代码路径中的服务器端渲染崩溃 → 参见 ssr-platform-specific-apis

性能

  • 由于父元素传递了不稳定的 props,导致子元素被不必要地重新渲染 → 参见 perf-props-stability-update-optimization
  • 计算对象即使值相同仍会重新触发效果 → 参见 perf-computed-object-stability

SFC(单文件组件)

  • 尝试从组件脚本块中使用命名导出 → 参见 sfc-named-exports-forbidden
  • 模板中的变量在更改后未更新 → 参见 sfc-script-setup-reactivity
  • 作用域样式未应用于子组件元素 → 参见 sfc-scoped-css-child-component-styling
  • 作用域样式未应用于动态 v-html 内容 → 参见 sfc-scoped-css-dynamic-content
  • 作用域样式未应用于插槽内容 → 参见 sfc-scoped-css-slot-content
  • 动态构建时缺少 Tailwind 类 → 参见 tailwind-dynamic-class-generation
  • 由于名称冲突导致递归组件无法渲染 → 参见 self-referencing-component-name

插件

  • 调试全局属性导致命名冲突的原因 → 参见 plugin-global-properties-sparingly
  • 插件无法正常工作或注入返回 undefined → 参见 plugin-install-before-mount
  • 基于 setup 的组件中无法访问插件的全局属性 → 参见 plugin-prefer-provide-inject-over-global-properties
  • 插件类型增强错误导致 ComponentCustomProperties 类型定义失效 → 参见 plugin-typescript-type-augmentation

应用配置

  • 在调用 mount 之后,应用配置方法无法正常工作 → 参见 configure-app-before-mount
  • 在 `mount()` 之后链式调用应用配置会失败,因为 `mount` 返回组件实例 → 参见 mount-return-value
  • 基于 require.context 的组件自动注册在 Vite 中失败 → 参见 dynamic-component-registration-vite
在 GitHub 上查看
---
name: vue-debug-guides
description: Diagnose and fix Vue 3 runtime errors, warnings, async failures, and SSR/hydration issues with targeted debugging guides.
---

Vue 3 debugging and error handling for runtime issues, warnings, async failures, and hydration bugs.
For development best practices and common gotchas, use `vue-best-practices`.

### Reactivity
- Tracing unexpected re-renders and state updates → See [reactivity-debugging-hooks](reference/reactivity-debugging-hooks.md)
- Ref values not updating due to missing .value access → See [ref-value-access](reference/ref-value-access.md)
- State stops updating after destructuring reactive objects → See [reactive-destructuring](reference/reactive-destructuring.md)
- Refs inside arrays, Maps, or Sets not unwrapping → See [refs-in-collections-need-value](reference/refs-in-collections-need-value.md)
- Nested refs rendering as [object Object] in templates → See [template-ref-unwrapping-top-level](reference/template-ref-unwrapping-top-level.md)
- Reactive proxy identity comparisons always return false → See [reactivity-proxy-identity-hazard](reference/reactivity-proxy-identity-hazard.md)
- Third-party instances breaking when proxied → See [reactivity-markraw-for-non-reactive](reference/reactivity-markraw-for-non-reactive.md)
- Watchers only firing once per tick unexpectedly → See [reactivity-same-tick-batching](reference/reactivity-same-tick-batching.md)

### Computed
- Computed getter triggers mutations or requests unexpectedly → See [computed-no-side-effects](reference/computed-no-side-effects.md)
- Mutating computed values causes changes to disappear → See [computed-return-value-readonly](reference/computed-return-value-readonly.md)
- Computed value never updates after conditional logic → See [computed-conditional-dependencies](reference/computed-conditional-dependencies.md)
- Sorting or reversing arrays breaks original state → See [computed-array-mutation](reference/computed-array-mutation.md)
- Passing parameters to computed properties fails → See [computed-no-parameters](reference/computed-no-parameters.md)

### Watchers
- Async operations overwriting with stale data → See [watch-async-cleanup](reference/watch-async-cleanup.md)
- Creating watchers inside async callbacks → See [watch-async-creation-memory-leak](reference/watch-async-creation-memory-leak.md)
- Watcher never triggers for reactive object properties → See [watch-reactive-property-getter](reference/watch-reactive-property-getter.md)
- Async watchEffect misses dependencies after await → See [watcheffect-async-dependency-tracking](reference/watcheffect-async-dependency-tracking.md)
- DOM reads are stale inside watcher callbacks → See [watch-flush-timing](reference/watch-flush-timing.md)
- Deep watchers report identical old/new values → See [watch-deep-same-object-reference](reference/watch-deep-same-object-reference.md)
- watchEffect runs before template refs update → See [watcheffect-flush-post-for-refs](reference/watcheffect-flush-post-for-refs.md)

### Components
- Child component throws "component not found" error → See [local-components-not-in-descendants](reference/local-components-not-in-descendants.md)
- Click listener doesn't fire on custom component → See [click-events-on-components](reference/click-events-on-components.md)
- Parent can't access child ref data in script setup → See [component-ref-requires-defineexpose](reference/component-ref-requires-defineexpose.md)
- HTML template parsing breaks Vue component syntax → See [in-dom-template-parsing-caveats](reference/in-dom-template-parsing-caveats.md)
- Wrong component renders due to naming collisions → See [component-naming-conflicts](reference/component-naming-conflicts.md)
- Parent styles don't apply to multi-root component → See [multi-root-component-class-attrs](reference/multi-root-component-class-attrs.md)

### Props & Emits
- Variables referenced in defineProps cause errors → See [prop-defineprops-scope-limitation](reference/prop-defineprops-scope-limitation.md)
- Component emits undeclared event causing warnings → See [declare-emits-for-documentation](reference/declare-emits-for-documentation.md)
- defineEmits used inside function or conditional → See [defineEmits-must-be-top-level](reference/defineEmits-must-be-top-level.md)
- defineEmits has both type and runtime arguments → See [defineEmits-no-runtime-and-type-mixed](reference/defineEmits-no-runtime-and-type-mixed.md)
- Native event listeners not responding to clicks → See [native-event-collision-with-emits](reference/native-event-collision-with-emits.md)
- Component event fires twice when clicking → See [undeclared-emits-double-firing](reference/undeclared-emits-double-firing.md)

### Templates
- Getting template compilation errors with statements → See [template-expressions-restrictions](reference/template-expressions-restrictions.md)
- "Cannot read property of undefined" runtime errors → See [v-if-null-check-order](reference/v-if-null-check-order.md)
- Dynamic directive arguments not working properly → See [dynamic-argument-constraints](reference/dynamic-argument-constraints.md)
- v-else elements rendering unconditionally always → See [v-else-must-follow-v-if](reference/v-else-must-follow-v-if.md)
- Mixing v-if with v-for causes precedence bugs and migration breakage → See [no-v-if-with-v-for](reference/no-v-if-with-v-for.md)
- Template function calls mutating state cause unpredictable re-render bugs → See [template-functions-no-side-effects](reference/template-functions-no-side-effects.md)
- Child components in loops showing undefined data → See [v-for-component-props](reference/v-for-component-props.md)
- Array order changing after sorting or reversing → See [v-for-computed-reverse-sort](reference/v-for-computed-reverse-sort.md)
- List items disappearing or swapping state unexpectedly → See [v-for-key-attribute](reference/v-for-key-attribute.md)
- Getting off-by-one errors with range iteration → See [v-for-range-starts-at-one](reference/v-for-range-starts-at-one.md)
- v-show or v-else not working on template elements → See [v-show-template-limitation](reference/v-show-template-limitation.md)

### Template Refs
- Ref becomes null when element is conditionally hidden → See [template-ref-null-with-v-if](reference/template-ref-null-with-v-if.md)
- Ref array indices don't match data array in loops → See [template-ref-v-for-order](reference/template-ref-v-for-order.md)
- Refactoring template ref names breaks silently in code → See [use-template-ref-vue35](reference/use-template-ref-vue35.md)

### Forms & v-model
- Initial form values not showing when using v-model → See [v-model-ignores-html-attributes](reference/v-model-ignores-html-attributes.md)
- Textarea content changes not updating the ref → See [textarea-no-interpolation](reference/textarea-no-interpolation.md)
- iOS users cannot select dropdown first option → See [select-initial-value-ios-bug](reference/select-initial-value-ios-bug.md)
- Parent and child components have different values → See [define-model-default-value-sync](reference/define-model-default-value-sync.md)
- Object property changes not syncing to parent → See [definemodel-object-mutation-no-emit](reference/definemodel-object-mutation-no-emit.md)
- Real-time search/validation broken for Chinese/Japanese input → See [v-model-ime-composition](reference/v-model-ime-composition.md)
- Number input returns empty string instead of zero → See [v-model-number-modifier-behavior](reference/v-model-number-modifier-behavior.md)
- Custom checkbox values not submitted in forms → See [checkbox-true-false-value-form-submission](reference/checkbox-true-false-value-form-submission.md)

### Events & Modifiers
- Chaining multiple event modifiers produces unexpected results → See [event-modifier-order-matters](reference/event-modifier-order-matters.md)
- Keyboard shortcuts don't fire with system modifier keys → See [keyup-modifier-timing](reference/keyup-modifier-timing.md)
- Keyboard shortcuts fire with unintended modifier combinations → See [exact-modifier-for-precise-shortcuts](reference/exact-modifier-for-precise-shortcuts.md)
- Combining passive and prevent modifiers breaks event behavior → See [no-passive-with-prevent](reference/no-passive-with-prevent.md)

### Lifecycle
- Memory leaks from unremoved event listeners → See [cleanup-side-effects](reference/cleanup-side-effects.md)
- DOM access fails before component mounts → See [lifecycle-dom-access-timing](reference/lifecycle-dom-access-timing.md)
- DOM reads return stale values after state changes → See [dom-update-timing-nexttick](reference/dom-update-timing-nexttick.md)
- SSR rendering differs from client hydration → See [lifecycle-ssr-awareness](reference/lifecycle-ssr-awareness.md)
- Lifecycle hooks registered asynchronously never run → See [lifecycle-hooks-synchronous-registration](reference/lifecycle-hooks-synchronous-registration.md)

### Slots
- Accessing child component data in slot content returns undefined values → See [slot-render-scope-parent-only](reference/slot-render-scope-parent-only.md)
- Mixing named and scoped slots together causes compilation errors → See [slot-named-scoped-explicit-default](reference/slot-named-scoped-explicit-default.md)
- Using v-slot on native HTML elements causes compilation errors → See [slot-v-slot-on-components-or-templates-only](reference/slot-v-slot-on-components-or-templates-only.md)
- Unexpected content placement from implicit default slot behavior → See [slot-implicit-default-content](reference/slot-implicit-default-content.md)
- Scoped slot props missing expected name property → See [slot-name-reserved-prop](reference/slot-name-reserved-prop.md)
- Wrapper components breaking child slot functionality → See [slot-forwarding-to-child-components](reference/slot-forwarding-to-child-components.md)

### Provide/Inject
- Calling provide after async operations fails silently → See [provide-inject-synchronous-setup](reference/provide-inject-synchronous-setup.md)
- Tracing where provided values come from → See [provide-inject-debugging-challenges](reference/provide-inject-debugging-challenges.md)
- Injected values not updating when provider changes → See [provide-inject-reactivity-not-automatic](reference/provide-inject-reactivity-not-automatic.md)
- Multiple components share same default object → See [provide-inject-default-value-factory](reference/provide-inject-default-value-factory.md)

### Attrs
- Both internal and fallthrough event handlers execute → See [attrs-event-listener-merging](reference/attrs-event-listener-merging.md)
- Explicit attributes overwritten by fallthrough values → See [fallthrough-attrs-overwrite-vue3](reference/fallthrough-attrs-overwrite-vue3.md)
- Attributes applying to wrong element in wrappers → See [inheritattrs-false-for-wrapper-components](reference/inheritattrs-false-for-wrapper-components.md)

### Composables
- Composable called outside setup context or asynchronously → See [composable-call-location-restrictions](reference/composable-call-location-restrictions.md)
- Composable reactive dependency not updating when input changes → See [composable-tovalue-inside-watcheffect](reference/composable-tovalue-inside-watcheffect.md)
- Composable mutates external state unexpectedly → See [composable-avoid-hidden-side-effects](reference/composable-avoid-hidden-side-effects.md)
- Destructuring composable returns breaks reactivity unexpectedly → See [composable-naming-return-pattern](reference/composable-naming-return-pattern.md)

### Composition API
- Lifecycle hooks failing silently after async operations → See [composition-api-script-setup-async-context](reference/composition-api-script-setup-async-context.md)
- Parent component refs unable to access exposed properties → See [define-expose-before-await](reference/define-expose-before-await.md)
- Functional-programming patterns break expected Vue reactivity behavior → See [composition-api-not-functional-programming](reference/composition-api-not-functional-programming.md)
- React Hook mental model causes incorrect Composition API usage → See [composition-api-vs-react-hooks-differences](reference/composition-api-vs-react-hooks-differences.md)

### Animation
- Animations fail to trigger when DOM nodes are reused → See [animation-key-for-rerender](reference/animation-key-for-rerender.md)
- TransitionGroup list updates feel laggy under load → See [animation-transitiongroup-performance](reference/animation-transitiongroup-performance.md)

### TypeScript
- Mutable prop defaults leak state between component instances → See [ts-withdefaults-mutable-factory-function](reference/ts-withdefaults-mutable-factory-function.md)
- reactive() generic typing causes ref unwrapping mismatches → See [ts-reactive-no-generic-argument](reference/ts-reactive-no-generic-argument.md)
- Template refs throw null access errors before mount or after v-if unmount → See [ts-template-ref-null-handling](reference/ts-template-ref-null-handling.md)
- Optional boolean props behave as false instead of undefined → See [ts-defineprops-boolean-default-false](reference/ts-defineprops-boolean-default-false.md)
- Imported defineProps types fail with unresolvable or complex type references → See [ts-defineprops-imported-types-limitations](reference/ts-defineprops-imported-types-limitations.md)
- Untyped DOM event handlers fail under strict TypeScript settings → See [ts-event-handler-explicit-typing](reference/ts-event-handler-explicit-typing.md)
- Dynamic component refs trigger reactive component warnings → See [ts-shallowref-for-dynamic-components](reference/ts-shallowref-for-dynamic-components.md)
- Union-typed template expressions fail type checks without narrowing → See [ts-template-type-casting](reference/ts-template-type-casting.md)

### Async Components
- Route components misconfigured with defineAsyncComponent lazy loading → See [async-component-vue-router](reference/async-component-vue-router.md)
- Network failures or timeouts loading components → See [async-component-error-handling](reference/async-component-error-handling.md)
- Template refs undefined after component reactivation → See [async-component-keepalive-ref-issue](reference/async-component-keepalive-ref-issue.md)

### Render Functions
- Render function output stays static after state changes → See [rendering-render-function-return-from-setup](reference/rendering-render-function-return-from-setup.md)
- Reused vnode instances render incorrectly → See [render-function-vnodes-must-be-unique](reference/render-function-vnodes-must-be-unique.md)
- String component names render as HTML elements → See [rendering-resolve-component-for-string-names](reference/rendering-resolve-component-for-string-names.md)
- Accessing vnode internals breaks on Vue updates → See [render-function-avoid-internal-vnode-properties](reference/render-function-avoid-internal-vnode-properties.md)
- Vue 2 render function patterns crash in Vue 3 → See [rendering-render-function-h-import-vue3](reference/rendering-render-function-h-import-vue3.md)
- Slot content not rendering from h() → See [rendering-render-function-slots-as-functions](reference/rendering-render-function-slots-as-functions.md)

### KeepAlive
- Child components mount twice with nested Vue Router routes → See [keepalive-router-nested-double-mount](reference/keepalive-router-nested-double-mount.md)
- Memory grows when combining KeepAlive with Transition animations → See [keepalive-transition-memory-leak](reference/keepalive-transition-memory-leak.md)

### Transitions
- JavaScript transition hooks hang without done callback → See [transition-js-hooks-done-callback](reference/transition-js-hooks-done-callback.md)
- Move animations fail on inline list elements → See [transition-group-flip-inline-elements](reference/transition-group-flip-inline-elements.md)
- List items jump instead of smoothly animating → See [transition-group-move-animation-position-absolute](reference/transition-group-move-animation-position-absolute.md)
- Vue 2 to Vue 3 TransitionGroup wrapper changes break layout → See [transition-group-no-default-wrapper-vue3](reference/transition-group-no-default-wrapper-vue3.md)
- Nested transitions cut off before finishing → See [transition-nested-duration](reference/transition-nested-duration.md)
- Scoped styles stop working in reusable transition wrappers → See [transition-reusable-scoped-style](reference/transition-reusable-scoped-style.md)
- RouterView transitions animate unexpectedly on first render → See [transition-router-view-appear](reference/transition-router-view-appear.md)
- Mixing CSS transitions and animations causes timing issues → See [transition-type-when-mixed](reference/transition-type-when-mixed.md)
- Cleanup hooks missed during rapid transition swaps → See [transition-unmount-hook-timing](reference/transition-unmount-hook-timing.md)

### Teleport
- Teleport target element not found in DOM → See [teleport-target-must-exist](reference/teleport-target-must-exist.md)
- Teleported content breaks SSR hydration → See [teleport-ssr-hydration](reference/teleport-ssr-hydration.md)
- Scoped styles not applying to teleported content → See [teleport-scoped-styles-limitation](reference/teleport-scoped-styles-limitation.md)

### Suspense
- Need to handle async errors from Suspense components → See [suspense-no-builtin-error-handling](reference/suspense-no-builtin-error-handling.md)
- Using Suspense with server-side rendering → See [suspense-ssr-hydration-issues](reference/suspense-ssr-hydration-issues.md)
- Async component loading/error UI ignored under Suspense → See [async-component-suspense-control](reference/async-component-suspense-control.md)

### SSR
- HTML differs between server and client renders → See [ssr-hydration-mismatch-causes](reference/ssr-hydration-mismatch-causes.md)
- User state leaks between requests from shared singleton stores → See [state-ssr-cross-request-pollution](reference/state-ssr-cross-request-pollution.md)
- Browser-only APIs crash server rendering in universal code paths → See [ssr-platform-specific-apis](reference/ssr-platform-specific-apis.md)

### Performance
- List children re-render unnecessarily because parent passes unstable props → See [perf-props-stability-update-optimization](reference/perf-props-stability-update-optimization.md)
- Computed objects retrigger effects despite equivalent values → See [perf-computed-object-stability](reference/perf-computed-object-stability.md)

### SFC (Single File Components)
- Trying to use named exports from component script blocks → See [sfc-named-exports-forbidden](reference/sfc-named-exports-forbidden.md)
- Variables not updating in template after changes → See [sfc-script-setup-reactivity](reference/sfc-script-setup-reactivity.md)
- Scoped styles not applying to child component elements → See [sfc-scoped-css-child-component-styling](reference/sfc-scoped-css-child-component-styling.md)
- Scoped styles not applying to dynamic v-html content → See [sfc-scoped-css-dynamic-content](reference/sfc-scoped-css-dynamic-content.md)
- Scoped styles not applying to slot content → See [sfc-scoped-css-slot-content](reference/sfc-scoped-css-slot-content.md)
- Tailwind classes missing when built dynamically → See [tailwind-dynamic-class-generation](reference/tailwind-dynamic-class-generation.md)
- Recursive components not rendering due to name conflicts → See [self-referencing-component-name](reference/self-referencing-component-name.md)

### Plugins
- Debugging why global properties cause naming conflicts → See [plugin-global-properties-sparingly](reference/plugin-global-properties-sparingly.md)
- Plugin not working or inject returns undefined → See [plugin-install-before-mount](reference/plugin-install-before-mount.md)
- Plugin global properties are unavailable in setup-based components → See [plugin-prefer-provide-inject-over-global-properties](reference/plugin-prefer-provide-inject-over-global-properties.md)
- Plugin type augmentation mistakes break ComponentCustomProperties typing → See [plugin-typescript-type-augmentation](reference/plugin-typescript-type-augmentation.md)

### App Configuration
- App configuration methods not working after mount call → See [configure-app-before-mount](reference/configure-app-before-mount.md)
- Chaining app config off mount() fails because mount returns component instance → See [mount-return-value](reference/mount-return-value.md)
- require.context-based component auto-registration fails in Vite → See [dynamic-component-registration-vite](reference/dynamic-component-registration-vite.md)

所有文件

140 个文件

安装 vue-debug-guides

下载技能文件并将其解压到 .claude/skills/ 目录下。

下载ZIP

克隆仓库并复制技能文件到您的项目中。

git clone https://github.com/vuejs-ai/skills/tree/main/skills/vue-debug-guides # Copy SKILL.md to your .claude/skills/ directory

复制 复制
快速设置: 将技能文件夹复制到 .claude/skills/ Claude 会自动检测并使用该技能

相关技能

github-code-search
更新时间 2026-06-29
drizzle-orm
更新时间 2026-06-29
prisma-client-api
更新时间 2026-06-29
clickhouse-io
更新时间 2026-06-29
OR