vue-component-development

在创建或修改 resources/app/ 目录下的 Vue 3 组件、页面、布局、状态管理或服务时启用。本模板适用于组件模式设计、DaisyUI 使用、图标系统、Toast 通知、抽屉交互、表单处理以及单页应用的路由与认证流程相关工作。

仓库最近推送
GitHub Stars
147
Forks
61
Issues / PRs
5

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "vue-component-development":https://skillpi.com/zh/skills/deepskill-38ef21f5cc2a994887dec5bd040f34c50adcf1d37588daa035f1e013c867edf9。安装前核对上游来源和版本:https://github.com/gdarko/laravel-vue-starter。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

在创建或修改 resources/app/ 目录下的 Vue 3 组件、页面、布局、状态管理或服务时启用。本模板适用于组件模式设计、DaisyUI 使用、图标系统、Toast 通知、抽屉交互、表单处理以及单页应用的路由与认证流程相关工作。

0 下载

介绍来源: third_party · gdarko · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: vue-component-development
description: "Activate when creating or modifying Vue 3 components, pages, layouts, stores, or services in the frontend. Covers component patterns, DaisyUI usage, icon system, toast notifications, drawer patterns, form handling, and the SPA routing/auth flow. Use when working in resources/app/."
license: MIT
metadata:
  author: project

Vue Component Development

Patterns and conventions for building Vue 3 frontend components in this project.

Component Architecture

Directory Structure

  • views/layouts/ — Layout wrappers (Page, Menu, Auth)
  • views/components/ — Reusable UI components (Button, TextInput, Table, Modal, etc.)
  • views/components/icons/ — Icon system (Icon, Avatar, Spinner)
  • views/components/input/ — Form input components
  • views/components/filters/ — Filter components for list pages
  • views/pages/ — Page-level components organized by auth/private/shared
  • stores/ — Pinia stores (auth, toast, alert, global)
  • services/ — TypeScript API service classes extending BaseService
  • helpers/ — Pure utility functions

Component Conventions

  • Use Options API with defineComponent() and setup() function (project convention)
  • Use reactive() for form state, ref() for simple values, computed() for derived state
  • Import components explicitly — no global registration
  • Props use camelCase in JS, kebab-case in templates

UI Framework: DaisyUI 5

This project uses DaisyUI 5 on top of Tailwind CSS 4. Prefer DaisyUI component classes over hand-rolled Tailwind.

Key classes

  • Buttons: btn btn-primary, btn-success, btn-error, btn-outline, btn-ghost, btn-sm
  • Inputs: input input-bordered, textarea textarea-bordered, select
  • Cards: card bg-base-100 shadow, card-body, card-title
  • Tables: table with hover on <tr>
  • Badges: badge badge-success, badge-error, badge-warning, badge-info
  • Alerts: alert alert-success, alert-error
  • Modal: modal, modal-open, modal-box, modal-backdrop
  • Navigation: navbar, menu, breadcrumbs, dropdown
  • Loading: loading loading-spinner, skeleton
  • Layout: drawer, drawer-side, drawer-content

Theme Colors

Use semantic DaisyUI colors, not raw Tailwind colors:

  • primary (teal), secondary, accent, neutral
  • success, warning, error, info
  • base-100 (surface), base-200 (background), base-300 (border), base-content (text)
  • Opacity variants: text-base-content/50, border-base-300/50

Dark Mode

The project supports light/dark themes via data-theme attribute on <html>. Both themes use the same teal primary. Custom sidebar colors use --color-sidebar / --color-sidebar-content CSS variables that adapt per theme. Never hardcode white/black — use semantic DaisyUI colors.

Icon System

Icons use a thin wrapper around Heroicons:

<Icon name="users" class="h-5 w-5" />

To add a new icon: import it in views/components/icons/Icon.vue from @heroicons/vue/24/outline and add a name→component entry to the iconMap.

Toast Notifications

Use the toast store for user feedback instead of inline alerts:

import {useToastStore} from "@/stores/toast";
const toastStore = useToastStore();
toastStore.success('Done!');
toastStore.error('Failed.');
toastStore.info('FYI...');
toastStore.warning('Careful!');

Toasts auto-dismiss after 5 seconds. They accept strings, arrays, or validation error objects.

Drawer Pattern for CRUD

List pages use a slide-in drawer instead of separate create/edit pages:

  • Drawer state: reactive({ open, mode, loading, form })
  • Open with drawer.open = true and set drawer.mode to 'create' or 'edit'
  • Close with drawer.open = false, refresh list on success
  • Use <Transition name="slide-right"> for animation and <Teleport> if needed

API Services

  • Services extend BaseService or ModelService (for CRUD)
  • ModelService provides: index(), store(), update(), delete(), edit(), find()
  • handleCreate() and handleUpdate() manage loading states and toast notifications
  • PUT/PATCH use POST with _method field to support FormData file uploads

Form Handling

  • Use reactive() for form state
  • Use reduceProperties(form, ['roles'], 'id') to flatten nested objects before submission
  • Use fillObject(form, data) to populate form from API response
  • Use clearObject(form) to reset form

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供 Vue 3 组件开发的完整规范与模式,涵盖组件架构、UI 框架、图标系统、Toast 通知、抽屉模式、表单处理等
  • 适用于前端开发者在 resources/app/ 目录下工作,具有明确的实用价值和广泛受众
触发精准95/100

亮点

  • description 明确描述了激活场景(创建或修改 Vue 3 组件等)和使用范围(resources/app/ 目录)
  • 覆盖多种组件类型和开发模式,边界清晰,触发词精准完整
结构规范95/100

亮点

  • 文档结构清晰,分章节介绍组件架构、UI 框架、图标系统、Toast 通知、抽屉模式、API 服务、表单处理等
  • 每个部分都有详细说明和示例代码,frontmatter 完整,单文件未超过 500 行
执行可靠90/100

亮点

  • 提供了具体的代码示例和最佳实践,工具来源明确(DaisyUI、Heroicons、Pinia)
  • 参数使用正确,覆盖了主要的使用场景和异常处理建议
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • heroicons.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。