vue-best-practices by uni-helper/skills
npx skills add https://github.com/uni-helper/skills --skill vue-best-practicesVue 3 最佳实践、常见陷阱与性能优化。
ref() 值而未使用 .value → 参见 ref-value-accessreactive() 对象,丢失响应性 → 参见 reactive-destructuringref() 还是 reactive() → 参见 prefer-ref-over-reactive广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
=== 运算符比较响应式对象 → 参见 reactivity-proxy-identity-hazardwatchEffect 而非 computed 派生状态 → 参见 reactivity-computed-over-watcheffect-mutationsawait 后访问的依赖项未被追踪 → 参见 watcheffect-async-dependency-trackingwatch 还是 watchEffect → 参见 watch-vs-watcheffectnull 或陈旧值 → 参见 watcheffect-flush-post-for-refs<script setup> 中无法访问子组件的 ref 数据 → 参见 component-ref-requires-defineexposedefineProps 中引用的变量导致错误 → 参见 prop-defineprops-scope-limitationdefineEmits 在函数或条件语句内部使用 → 参见 defineEmits-must-be-top-leveldefineEmits 同时具有类型和运行时参数 → 参见 defineEmits-no-runtime-and-type-mixedv-else 元素总是无条件渲染 → 参见 v-else-must-follow-v-ifv-if 还是 v-show → 参见 v-if-vs-v-show-performancev-show 或 v-else 在 template 元素上无效 → 参见 v-show-template-limitationnull → 参见 template-ref-null-with-v-ifv-model 时初始表单值未显示 → 参见 v-model-ignores-html-attributestextarea 内容更改未更新引用 → 参见 textarea-no-interpolationv-model 修饰符 → 参见 definemodel-hidden-modifier-propsv-slot → 参见 slot-v-slot-on-components-or-templates-onlyname 属性 → 参见 slot-name-reserved-propprovide 静默失败 → 参见 provide-inject-synchronous-setupwatch() 观察透传属性的变化 → 参见 attrs-not-reactivesetup 上下文外或异步调用 → 参见 composable-call-location-restrictions<script setup> 中使用自定义指令 → 参见 directive-naming-v-prefixVue 3 best practices, common gotchas, and performance optimization.
Weekly Installs
180
Repository
GitHub Stars
38
First Seen
Jan 30, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex173
opencode172
gemini-cli171
kimi-cli168
github-copilot168
amp168
Vue.js测试最佳实践:Vue 3组件、组合式函数、Pinia与异步测试完整指南
3,900 周安装