Skip to content
cccskills
FreePublished on GitHub

tinyvue-develop-spec

Use this skill when developing tinyvue components, themes, localization, or tests. It explains where templates, renderless logic, styles, and shared utilities belong, and helps keep changes aligned with the library’s architecture.

OriginalShow the original description

tinyvue组件库开发规范

opentiny/tiny-vue2,267 stars(GitHub 2,267 + cccskills 0)

Run score Not tested

See how to install

Good for

  • Adding a tinyvue UI component
  • Changing or refactoring component logic
  • Developing themes or localization
  • Writing component tests

Files included (12)

  • SKILL.md3.4 KB
  • common.skill.md7.8 KB
  • design.skill.md9.9 KB
  • directive.skill.md6.0 KB
  • hooks.skill.md5.9 KB
  • i18n-workflow.skill.md9.9 KB
  • icon.skill.md1.3 KB
  • renderless.skill.md9.4 KB
  • testing-guide.skill.md11.2 KB
  • theme.skill.md11.5 KB
  • utils.skill.md5.7 KB
  • vue.skill.md9.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

使用时机

在当前仓库进行组件的开发,主题开发,国际化开发,测试脚本开发时,必须遵守以下规范。

适用场景

  • 新增 UI 组件
  • 修改现有组件逻辑
  • 重构组件架构
  • 理解 Renderless 模式

重要术语

  1. 跨端模板: tiny vue组件库中,同一个组件可以有2种组件模板, 其中pc.vue 面向家用PC浏览器的场景, mobile-first.vue是移动优先的浏览器场景(可以兼容用户使用手机或PC浏览器)。

  2. 无渲染逻辑层: tiny vue组件库遵从模板和逻辑分离的原则进行开发。模板层只负责绑定变量和函数,所有的业务逻辑(data 处理、状态计算等)都要放在无渲染逻辑层 packages/renderless 目录

组件库的架构

模块名称代码目录参考规范说明
模板层packages/vue./vue.skill.md每个组件的模板,必须在相应的组件目录
无渲染逻辑层packages/renderless./renderless.skill.md每个组件的逻辑,必须在相应的组件目录
样式层packages/theme./theme.skill.md每个组件的样式,必须在相应的组件目录
设计规范层packages/design./design.skill.md交互规范、默认 props、图标与 renderless 扩展
适配Vue2/Vue3层packages/vue-common./common.skill.md非必要不修改适配层代码
图标库packages/vue-icon./icon.skill.md图标库
国际化层packages/vue-locale./i18n-workflow.skill.md组件的国际化
公用hookspackages/vue-hooks./hooks.skill.md跨组件可以复用的hooks函数
公用指令packages/vue-directive./directive.skill.md跨组件可以复用的指令
utilspackages/utils./utils.skill.md公用函数
组件测试examples/sites/demos/pc/app/**/*.spec.ts 或 packages/vue/src/**/__tests__./testing-guide.skill.mde2e测试和单元测试
文档开发examples/sites/demos/pc/app/**./vue.skill.md每一个组件的 api 和 demo 的开发

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

Report a problem with this skill