create-adaptable-composable
vuejs-ai · Development
创建一个符合库标准的 Vue 组合式函数,接受可能为响应式的输入(MaybeRef / MaybeRefOrGetter),使调用者可传入普通值、ref 或 getter。在响应式副作用(watch/watchEffect)中使用 toValue()/toRef() 正常化输入,以保持行为可预测且响应式。当用户要求创建可适应或可复用的组合式函数时使用此技能。
Create a library-grade Vue composable that accepts maybe-reactive inputs (MaybeRef / MaybeRefOrGetter) so callers can pass a plain value, ref, or getter. Normalize inputs with toValue()/toRef() inside reactive effects (watch/watchEffect) to keep behavior predictable and reactive. Use this skill when user asks for creating adaptable or reusable composables.
npx skills add https://github.com/vuejs-ai/skills --skill create-adaptable-composable
星标 2571 · 安装量 6865