{"_id":"@cst-ui/cst-buttons","name":"@cst-ui/cst-buttons","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@cst-ui/cst-buttons","version":"0.1.0","description":"CST themed Vue 3 button components based on Element Plus.","license":"UNLICENSED","type":"module","main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","sideEffects":["*.css"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"},"./style.css":"./dist/style.css"},"scripts":{"build":"vite build && vue-tsc -p tsconfig.build.json --declaration --emitDeclarationOnly","typecheck":"vue-tsc -p tsconfig.build.json --noEmit"},"peerDependencies":{"element-plus":"^2.8.5","vue":"^3.5.13"},"gitHead":"43af4127b14ebd65270b2baaf2054f6e0086403c","_id":"@cst-ui/cst-buttons@0.1.0","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-r159BiUVuQZ7+U2MvJu3ZF5b62iWnrJchIQRFbzlUiOJvyjzW4XOE7duYeq+ZfLGsjCl2w3ZNhQ87F02vwyBfw==","shasum":"585acf302fbb06ccd70e73df7b36a669c55b16f7","tarball":"https://registry.npmjs.org/@cst-ui/cst-buttons/-/cst-buttons-0.1.0.tgz","fileCount":17,"unpackedSize":123898,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCCLJOEucskrBqZTV4naVY7nAMEPB7KOJaYGJ60oh+YcAIhAMBghiWjwCS1nxYV6wUOMsppRTGXb6haYyuPYjuRcQiH"}]},"_npmUser":{"name":"amiyadajunpeng","email":"3312139223@qq.com"},"directories":{},"maintainers":[{"name":"amiyadajunpeng","email":"3312139223@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cst-buttons_0.1.0_1778476893748_0.6415749139196427"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-11T05:21:33.607Z","0.1.0":"2026-05-11T05:21:33.894Z","modified":"2026-05-11T05:21:34.090Z"},"maintainers":[{"name":"amiyadajunpeng","email":"3312139223@qq.com"}],"description":"CST themed Vue 3 button components based on Element Plus.","license":"UNLICENSED","readme":"# @cst-ui/cst-buttons\n\nCST 项目主题按钮组件库，基于 Vue 3 和 Element Plus 封装。\n\n这个包的目标是：其他子系统只需要通过 npm 安装并引入这个包，就可以直接使用 CST 统一主题按钮，不需要再复制主系统的样式文件。\n\n## 安装\n\n```bash\npnpm add @cst-ui/cst-buttons\n```\n\n## 全局注册\n\n在子系统入口文件中注册组件并引入样式：\n\n```ts\nimport { createApp } from 'vue'\nimport App from './App.vue'\nimport CstButtons from '@cst-ui/cst-buttons'\nimport '@cst-ui/cst-buttons/style.css'\n\nconst app = createApp(App)\n\napp.use(CstButtons)\napp.mount('#app')\n```\n\n## 组件列表\n\n```vue\n<CstButton />\n<CstAddButton />\n<CstTextAddButton />\n<CstMoveButton />\n<CstEditButton />\n<CstManageButton />\n<CstDeleteButton />\n<CstSubmitButton />\n<CstCancelButton />\n<CstBackTopButton />\n```\n\n## 使用示例\n\n固定语义按钮直接使用对应组件：\n\n```vue\n<CstAddButton />\n<CstDeleteButton />\n<CstSubmitButton>保存</CstSubmitButton>\n<CstCancelButton>取消</CstCancelButton>\n```\n\n不在固定语义里的按钮，统一使用 `CstButton`：\n\n```vue\n<CstButton icon=\"Refresh\">刷新</CstButton>\n<CstButton secondary icon=\"Upload\">导入</CstButton>\n<CstButton icon=\"Download\" :loading=\"exporting\">导出</CstButton>\n```\n\n## 子系统接入原则\n\n子系统不要再依赖主系统的 `src/style.css`。\n\n如果子系统需要 CST 主题按钮，只需要依赖本包：\n\n```ts\nimport CstButtons from '@cst-ui/cst-buttons'\nimport '@cst-ui/cst-buttons/style.css'\n```\n\n语义明确的按钮使用 `CstAddButton`、`CstDeleteButton` 等组件；其他普通按钮使用 `CstButton`。\n\n## 依赖说明\n\n`vue` 和 `element-plus` 是 peer dependency，需要由使用方项目提供。\n\n本包自带 CST 按钮主题样式，使用方不需要额外复制主系统按钮样式。\n","readmeFilename":"README.md","_rev":"1-46e8f7684c03c80480564150b3c2069e"}