- 使用 setup() 函数处理组件逻辑
- 利用 ref 和 reactive 实现响应式状态
- 使用 computed() 实现计算属性
- 使用 watch 和 watchEffect 处理副作用
- 使用 onMounted、onUpdated 等实现生命周期钩子
- 利用 provide/inject 进行依赖注入
Composition API Vue 3 Composition API General
使用 Composition API 的 Vue 3 组件的一般指导原则。这包括组件结构和响应式状态管理的最佳实践和建议。
Composition API Vue 3 Composition API General by liaosw97 · 572dc6b
npx skillmds@latest add liaosw97/composition-api-vue-3-composition-api-general File contents
---name: composition-api-vue-3-composition-api-generaldescription: 使用 Composition API 的 Vue 3 组件的一般指导原则。这包括组件结构和响应式状态管理的最佳实践和建议。---- 使用 setup() 函数处理组件逻辑- 利用 ref 和 reactive 实现响应式状态- 使用 computed() 实现计算属性- 使用 watch 和 watchEffect 处理副作用- 使用 onMounted、onUpdated 等实现生命周期钩子- 利用 provide/inject 进行依赖注入
liaosw97/awesome-rules-skills/tree/main/plugins/vue/skills/composition-api-vue-3-composition-api---general commit 572dc6bb1f
Frequently asked questions
Run npx skillmds@latest add liaosw97/composition-api-vue-3-composition-api-general in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
使用 Composition API 的 Vue 3 组件的一般指导原则。这包括组件结构和响应式状态管理的最佳实践和建议。 It is listed under Web & Frontend on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: docs only. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
liaosw97 (@liaosw97) published this skill. Their other Agent Skills are listed on their SkillMD profile.