返回顶部
v

vue-component-generator

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

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
617
下载量
1
收藏
概述
安装方式
版本历史

vue-component-generator

# Vue Component Generator 快速生成专业的 Vue 3 组件代码。 ## 功能 - ⚡ 一键生成组件 - 📝 支持 TypeScript - 🎯 Composition API / Options API - 🎨 SCSS 样式支持 - 📖 Props/Emits 定义 ## 支持的 API | API | 说明 | |-----|------| | composition | Composition API (推荐) | | options | Options API | | script-setup | `<script setup>` 语法 | ## 组件类型 - 普通组件 - 路由组件 - 布局组件 - 表单组件 ## 使用方法 ### 基本用法 ```bash # 生成 Composition API 组件 vue-component-generator MyButton --api composition # 生成 Options API 组件 vue-component-generator MyModal --api options # 生成 TypeScript 组件 vue-component-generator MyForm --typescript ``` ### 选项 | 选项 | 说明 | |------|------| | `--api, -a` | API 类型 (composition/options) | | `--typescript, -t` | 启用 TypeScript | | `--scss, -s` | 启用 SCSS | | `--output, -o` | 输出目录 | ## 输出示例 ```vue <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> ``` ## 安装 ```bash # 无需额外依赖 ``` ## 变现思路 1. **组件库模板** - 销售专业组件库模板 2. **企业服务** - 定制 Vue 组件 3. **培训** - Vue 开发培训 ## 更多示例 ### 表单组件 ```bash vue-component-generator InputField --api composition --typescript ``` ### 模态框 ```bash vue-component-generator Modal --api composition --scss ```

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 vue-component-generator-1776281621 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 vue-component-generator-1776281621 技能

通过命令行安装

skillhub install vue-component-generator-1776281621

下载 Zip 包

⬇ 下载 vue-component-generator v1.0.0

文件大小: 2.09 KB | 发布时间: 2026-4-16 18:38

v1.0.0 最新 2026-4-16 18:38
Initial release of vue-component-generator.

- Instantly generates Vue 3 component templates with support for Composition API, Options API, and TypeScript.
- Produces single-file Vue components (SFC) including SCSS style support.
- Allows configuration of props, emits, and various component types (standard, routing, layout, form components).
- Command-line tool with flexible options: API syntax, TypeScript, SCSS, and output directory.
- No external dependencies required.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部