button-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseButton Skill
Button Skill
When To Use
适用场景
Use this skill when implementing base-theme button patterns in a Vue project using packages (not local component copies).
@rds-vue-ui/*当你在Vue项目中使用包(而非本地组件副本)实现基础主题按钮样式时,可使用本Skill。
@rds-vue-ui/*Inputs
输入项
- Framework:
Vue 3 - Package manager: (or npm/pnpm equivalent)
yarn - Private registry (required):
https://npm.edpl.us - Storybook docs URL:
https://rds-vue-ui.edpl.us/?path=/docs/components-button-buttons--docs - Base theme only (ignore alternate themes).
- 框架:
Vue 3 - 包管理器:(或npm/pnpm等效工具)
yarn - 私有仓库(必填):
https://npm.edpl.us - Storybook文档地址:
https://rds-vue-ui.edpl.us/?path=/docs/components-button-buttons--docs - 仅使用基础主题(忽略其他主题)。
Dependencies (Registry Packages)
依赖项(仓库包)
@rds-vue-ui/rds-theme-base- (if SCSS preprocessing is required by dependent packages)
sass-embedded
@rds-vue-ui/rds-theme-base- (如果依赖包需要SCSS预处理)
sass-embedded
Registry Configuration (Required)
仓库配置(必填)
- Add/update project :
.npmrc@rds-vue-ui:registry=https://npm.edpl.us/
- Validate package resolution:
npm view @rds-vue-ui/rds-theme-base version --registry=https://npm.edpl.us/
- 添加/更新项目的文件:
.npmrc@rds-vue-ui:registry=https://npm.edpl.us/
- 验证包解析:
npm view @rds-vue-ui/rds-theme-base version --registry=https://npm.edpl.us/
Workflow
工作流
- Configure with
.npmrcscoped registry.@rds-vue-ui - Install packages from private registry:
yarn add @rds-vue-ui/rds-theme-base- (if build fails on SCSS preprocessing).
yarn add -D sass-embedded
- Import base theme once in app entry:
import '@rds-vue-ui/rds-theme-base/dist/css/rds-theme-base.css';
- Implement button usage based on Storybook docs:
Components/Button/Buttons- Use documented classes (, size variants, solid/outline variants, disabled, block).
btn - Do not create local replacement button components to mimic RDS behavior.
- Use documented classes (
- Create/update practical demo examples and route links.
- Run QA checklist and resolve all open items.
- 在中配置
.npmrc作用域的仓库地址。@rds-vue-ui - 从私有仓库安装包:
yarn add @rds-vue-ui/rds-theme-base- (如果构建因SCSS预处理失败)。
yarn add -D sass-embedded
- 在应用入口处导入一次基础主题:
import '@rds-vue-ui/rds-theme-base/dist/css/rds-theme-base.css';
- 根据Storybook中文档实现按钮的使用:
Components/Button/Buttons- 使用文档中指定的类(、尺寸变体、实心/轮廓变体、禁用状态、块级样式)。
btn - 请勿创建本地替代按钮组件来模拟RDS的行为。
- 使用文档中指定的类(
- 创建/更新实用的演示示例和路由链接。
- 运行QA检查清单并解决所有待处理项。
Outputs
输出文件
README.mdspec/component-spec.mdexamples/*checklists/qa.md
README.mdspec/component-spec.mdexamples/*checklists/qa.md
Verification Checklist
验证检查清单
- contains
.npmrc.@rds-vue-ui:registry=https://npm.edpl.us/ - resolves from private registry.
@rds-vue-ui/rds-theme-base - Base theme CSS imported exactly once in app entry.
- Examples use documented button patterns from Storybook.
- No local replacement button component was introduced.
- Build completes successfully.
- 文件中包含
.npmrc。@rds-vue-ui:registry=https://npm.edpl.us/ - 可从私有仓库解析。
@rds-vue-ui/rds-theme-base - 基础主题CSS在应用入口处仅导入一次。
- 示例使用Storybook文档中指定的按钮样式。
- 未引入本地替代按钮组件。
- 构建成功完成。
Constraints
约束条件
- Base theme only.
- No non-base screenshots, variants, or token references.
- Prefer registry package usage over local component implementations.
- If details are unknown, mark them as and capture source needed to confirm.
TBD
- 仅使用基础主题。
- 不得使用非基础主题的截图、变体或令牌引用。
- 优先使用仓库包而非本地组件实现。
- 若有未知细节,标记为并记录需要确认的信息来源。
TBD
Failure Handling
故障处理
- Registry/auth failure:
- Verify scope is set to
.npmrc.@rds-vue-ui:registry=https://npm.edpl.us/ - Retry .
npm view @rds-vue-ui/rds-theme-base version --registry=https://npm.edpl.us/ - If still blocked, confirm VPN/SSO/token requirements for private registry access.
- Verify
- SCSS preprocessor failure:
- Install and rebuild.
sass-embedded
- Install
- 仓库/认证失败:
- 验证中的作用域是否设置为
.npmrc。@rds-vue-ui:registry=https://npm.edpl.us/ - 重试命令。
npm view @rds-vue-ui/rds-theme-base version --registry=https://npm.edpl.us/ - 若仍无法访问,确认私有仓库访问所需的VPN/SSO/令牌要求。
- 验证
- SCSS预处理失败:
- 安装并重新构建。
sass-embedded
- 安装