vue

Installation
SKILL.md

Vue

基于 Vue 3.5。始终使用 <script setup lang="ts">

偏好

  • 优先使用 TypeScript 而非 JavaScript
  • 优先使用 <script setup lang="ts"> 而非 <script>
  • 为性能考虑,如不需要深层响应式,优先使用 shallowRef 而非 ref
  • 始终使用组合式 API 而非选项式 API
  • 不鼓励使用响应式 Props 解构

核心

主题 描述 参考
Script Setup 和宏 <script setup>、defineProps、defineEmits、defineModel、defineExpose、defineOptions、defineSlots、泛型 script-setup-macros
响应式和生命周期 ref、shallowRef、computed、watch、watchEffect、effectScope、生命周期钩子、组合式函数 core-new-apis
Related skills
Installs
6
Repository
tnnevol/skills
First Seen
Mar 31, 2026