nuxt-components
2
总安装量
2
周安装量
#63245
全站排名
安装命令
npx skills add https://github.com/leeovery/claude-nuxt --skill nuxt-components
Agent 安装分布
amp
2
gemini-cli
2
github-copilot
2
codex
2
kimi-cli
2
opencode
2
Skill 文档
Nuxt Components
Vue 3 Composition API components with standardized organization and patterns.
Core Concepts
components.md – Script setup order, patterns, organization
Directory Structure
components/
âââ Common/ # Shared utilities (Copyable, LoadingLine)
âââ Detail/ # Entity detail views (PostDetail)
âââ Form/ # Reusable form inputs (AuthorSelect)
âââ Modals/ # Confirmation/action modals
âââ Nav/ # Navigation elements
âââ Slideovers/ # Slideout panels (CreatePostSlideover)
âââ TabSections/ # Tab content sections
âââ Tables/ # Data tables (PostsTable)
Script Setup Order
<script lang="ts" setup>
// 1. Imports
import createPostActionFactory from '~/features/posts/actions/create-post-action'
// 2. Props & Emits
const props = defineProps<{ author?: Author }>()
const emits = defineEmits<{ close: [success: boolean] }>()
// 3. Composables
const flash = useFlash()
// 4. Injections
const slideover = inject(SlideoverKey)
// 5. Refs
const formRef = useTemplateRef('formRef')
// 6. Toggles
const isOpen = ref(false)
// 7. Reactive props
const formData = ref<CreatePostData>({ title: '', content: '' })
// 8. Computed
const canSubmit = computed(() => formData.value.title && formData.value.content)
// 9. Fetch + queries
const { data: posts, refresh } = getPostsQuery(filters)
// 10. Builders (action/mutation factories)
const createPostAction = createPostActionFactory()
// 11. Watchers
watch(selectedAuthor, (a) => { formData.value.authorId = a?.ulid || '' })
// 12. Methods
const onSubmit = async (data) => { await createPostAction(data) }
// 13. Real-time listeners
privateChannel(Posts).on(PostCreated, refresh)
// 14. Provides
provide(SlideoverKey, { isOpen })
// 15. Lifecycles
onMounted(() => { /* ... */ })
</script>