← 返回列表
全部 Skill›开发 Development›ant-design-vue-module-guideline

ant-design-vue-module-guideline

作者 @findsun-vn · 语言 en
Guide Vue module generation using Ant Design Vue as the primary UI library.
开发 Development前端开发通用待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
0
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Skill: ant-design-vue-module-guideline

Purpose

Ensure generated frontend modules use Ant Design Vue consistently and appropriately.

This skill is intended for:

  • module pages
  • module components
  • form pages
  • list pages
  • CRUD-oriented enterprise UI

Project UI Assumption

This project uses:

  • Vue 3
  • TypeScript
  • Pinia
  • Vue Router
  • Ant Design Vue

Ant Design Vue is the primary UI component library.


Default UI Rule

Use Ant Design Vue by default for standard business UI:

  • Button
  • Form
  • Form.Item
  • Input
  • Input.Search
  • InputNumber
  • Select
  • Radio
  • Checkbox
  • Switch
  • DatePicker
  • Table
  • Tag
  • Card
  • Tabs
  • Modal
  • Drawer
  • Pagination
  • Breadcrumb
  • Dropdown
  • Menu
  • Spin
  • Empty
  • Result
  • Alert
  • message
  • notification

Do not build custom replacements for these unless there is a strong reason.


List Page Rule

For list pages, prefer:

  • a-card or clean page container
  • filter/search toolbar using Ant Design Vue form controls
  • a-table for tabular data
  • a-pagination if needed separately
  • a-tag for statuses
  • a-button for actions

The page should remain readable and enterprise-style.


Form Page Rule

For create/edit forms, prefer:

  • a-form
  • a-form-item
  • a-input
  • a-select
  • a-switch
  • a-checkbox
  • a-radio-group
  • a-date-picker
  • a-input-number
  • a-upload when needed

Avoid building manual HTML form systems when Ant Design Vue already solves the problem.


Detail / Overlay Rule

For detail panels or editing overlays, prefer:

  • a-modal
  • a-drawer
  • a-descriptions
  • a-card

Choose based on use case:

  • Modal -> quick edit / confirmation
  • Drawer -> medium-complexity edit/detail flow
  • Dedicated page -> large business workflow

Feedback Rule

Use Ant Design Vue feedback patterns:

  • message for lightweight operation feedback
  • notification for more visible async feedback
  • a-alert for inline warning/error/info
  • a-result for empty/error/success pages
  • a-spin for loading states
  • a-empty for no-data states

Styling Rule

  • Prefer Ant Design Vue defaults
  • Keep custom CSS minimal
  • Do not over-style components unnecessarily
  • Focus on consistency, spacing, and clarity
  • Avoid mixing multiple visual systems

Shared Component Rule

Only create wrappers in frontend/src/shared/components/ when:

  • the same Ant Design Vue pattern is reused multiple times
  • there is a clear app-wide convention
  • the wrapper simplifies usage instead of hiding everything

Good examples:

  • BaseTable
  • BasePageHeader
  • BaseStatusTag

Bad examples:

  • wrapping every Ant Design Vue component without adding value

Module Boundary Rule

Business-specific UI stays inside:

frontend/src/modules/<module_name>/components/

Generic reusable UI stays inside:

frontend/src/shared/components/

Do not move module UI into shared too early.


Form Validation Rule

Use frontend validation consistent with:

  • Ant Design Vue Form rules
  • backend validation rules
  • OpenAPI constraints where practical

Do not let frontend validation drift away from backend expectations.


Tables and Pagination Rule

For API list pages:

  • represent tabular data with a-table
  • wire pagination cleanly
  • align filter/sort fields with API query params
  • keep status/actions visually clear

Forbidden Patterns

  • introducing another primary UI library
  • replacing standard Ant Design Vue components with raw custom HTML unnecessarily
  • building inconsistent CRUD pages across modules
  • excessive custom CSS that breaks Ant Design Vue consistency
  • creating fake shared wrappers that add no value

Final Goal

Frontend UI should be:

  • consistent
  • enterprise-friendly
  • Ant Design Vue-based
  • maintainable
  • easy to extend across modules
评论
Ffindsun-vn
findsun-vn
findsun-vn/E-Commerce
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@findsun-vn
所属大类开发 Development / 前端开发
国内可用性通用
最近源活动—
风险提示无
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。