vue-component-generator

生成 Vue 3 组件模板,支持 Composition API、Options API、TypeScript、SFC 单文件组件,一键生成完整 Vue 组件代码。

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "vue-component-generator" with this command: npx skills add sunshine-del-ux/vue-component-generator

Vue Component Generator

快速生成专业的 Vue 3 组件代码。

功能

  • ⚡ 一键生成组件
  • 📝 支持 TypeScript
  • 🎯 Composition API / Options API
  • 🎨 SCSS 样式支持
  • 📖 Props/Emits 定义

支持的 API

API说明
compositionComposition API (推荐)
optionsOptions API
script-setup<script setup> 语法

组件类型

  • 普通组件
  • 路由组件
  • 布局组件
  • 表单组件

使用方法

基本用法

# 生成 Composition API 组件
vue-component-generator MyButton --api composition

# 生成 Options API 组件
vue-component-generator MyModal --api options

# 生成 TypeScript 组件
vue-component-generator MyForm --typescript

选项

选项说明
--api, -aAPI 类型 (composition/options)
--typescript, -t启用 TypeScript
--scss, -s启用 SCSS
--output, -o输出目录

输出示例

<template>
  <div class="my-button">
    <button @click="handleClick">
      {{ label }}
    </button>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const props = defineProps({
  label: {
    type: String,
    default: 'Click me'
  }
})

const emit = defineEmits(['click'])

const handleClick = () => {
  emit('click')
}
</script>

<style scoped>
.my-button {
  padding: 10px 20px;
}
</style>

安装

# 无需额外依赖

变现思路

  1. 组件库模板 - 销售专业组件库模板
  2. 企业服务 - 定制 Vue 组件
  3. 培训 - Vue 开发培训

更多示例

表单组件

vue-component-generator InputField --api composition --typescript

模态框

vue-component-generator Modal --api composition --scss

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

React Component Generator

生成 React 组件模板,支持 Function Component, Class Component, Hooks, TypeScript,一键生成完整组件代码。

Registry SourceRecently Updated
8300Profile unavailable
Coding

PigX UI 前端开发

PigX UI Pro 前端开发指南 - Vue 3 + TypeScript + Element Plus。当用户提到 PigX UI、PigX 前端、lgb-mgui 项目、Vue 3 企业级后台开发、Element Plus 后台开发时使用此技能。

Registry SourceRecently Updated
1881Profile unavailable
Coding

Uuid Generator

Generate UUIDs in versions v1, v4, and v5 with options for count, namespace, name, and output format.

Registry SourceRecently Updated
771Profile unavailable
Coding

Match Loop by John Perry

Two-agent iterative vibe-coding loop for OpenClaw. Use when the user wants one sub-agent to generate/build/code an app or artifact and a second analyst agent...

Registry SourceRecently Updated
1330Profile unavailable