{"_id":"@bowenyao/my-component","_rev":"9-8a3200c218c2c69585a785a45034dd37","name":"@bowenyao/my-component","dist-tags":{"latest":"0.1.4"},"versions":{"0.0.6":{"name":"@bowenyao/my-component","version":"0.0.6","_id":"@bowenyao/my-component@0.0.6","maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"dist":{"shasum":"13524201b22dfe80e3406d2214027efc9f39279d","tarball":"https://registry.npmjs.org/@bowenyao/my-component/-/my-component-0.0.6.tgz","fileCount":2,"integrity":"sha512-bxIOAHnNItE44sJy7IZ+om7zDlbjWBmww7Fo5TmRhQdUQMXjqiFJcoUigqxragIYujhOXqcpPj22HSsWqzaiXg==","signatures":[{"sig":"MEQCIHnLZr1jg8MsX93byymnZskTtP4kgiLuze9hYdvsqcZ4AiA3hXNTQX3canXyVwOf0JvuzF7SIbBp054gpZ52ZlhFcg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7238},"main":"./dist/cjs/index.cjs.js","type":"module","unpkg":"./dist/umd/index.umd.js","module":"./dist/es/index.es.js","exports":{".":{"import":"./dist/es/index.es.js","script":"./dist/umd/index.umd.js","require":"./dist/cjs/index.cjs.js"},"./style":"./dist/index.css"},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"bowenyao-ui","email":"15771799938@163.com"},"jsdelivr":"./dist/umd/index.umd.js","_npmVersion":"10.9.2","description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","directories":{},"_nodeVersion":"22.15.0","dependencies":{"vue":"^3.5.29","element-plus":"^2.13.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","@vitejs/plugin-vue":"^6.0.4","vite-plugin-static-copy":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/my-component_0.0.6_1774860532811_0.5853657423788494","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@bowenyao/my-component","version":"0.0.7","_id":"@bowenyao/my-component@0.0.7","maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"dist":{"shasum":"2737b78fe01c630c4a23abf9117f4b7498708ad0","tarball":"https://registry.npmjs.org/@bowenyao/my-component/-/my-component-0.0.7.tgz","fileCount":7,"integrity":"sha512-IqNNu2jI0gfa/D/tzn86Uhh8+OzwzvwdMojl6hdSkbMgubcyQHm0bs1S6QEJzxDyNeOWp91yoJvvhUh66bz7LQ==","signatures":[{"sig":"MEUCIFPcRBjfFxeCjJ/qCzi1jNHT1/eNrK16QVkeHISWcnHjAiEA9QiXwBQgJq4YbuXHB9Wo1sEtxB12DsD1ioydOaZO/3k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12937},"main":"./dist/cjs/index.cjs.js","type":"module","unpkg":"./dist/umd/index.umd.js","module":"./dist/es/index.es.js","exports":{".":{"import":"./dist/es/index.es.js","script":"./dist/umd/index.umd.js","require":"./dist/cjs/index.cjs.js"},"./style":"./dist/index.css"},"_npmUser":{"name":"bowenyao-ui","email":"15771799938@163.com"},"jsdelivr":"./dist/umd/index.umd.js","_npmVersion":"10.9.2","description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/my-component_0.0.7_1774861399148_0.11732115465436466","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@bowenyao/my-component","version":"0.0.8","_id":"@bowenyao/my-component@0.0.8","maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"dist":{"shasum":"0edfe3e1dbfebac6da75371870871d5166ebb493","tarball":"https://registry.npmjs.org/@bowenyao/my-component/-/my-component-0.0.8.tgz","fileCount":7,"integrity":"sha512-7YM1Lsoy9YsarFd1mbeo6aZK5KhlvJO+CeHTy+huiVafO8ZLP40hTif/kI7wG27hcqgr9jmLC37h7sAI+qbk/Q==","signatures":[{"sig":"MEYCIQDWxYulTtJ8Sr8m49ji8wGWH1KyONisRa1aEdRb/WlP/QIhAOut1rcQdRm+/eFuLdvXRcPUWZ+TxuW7lOf89Pbonc6/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":48293},"main":"./dist/cjs/index.cjs.js","type":"module","unpkg":"./dist/umd/index.umd.js","module":"./dist/es/index.es.js","exports":{".":{"import":"./dist/es/index.es.js","script":"./dist/umd/index.umd.js","require":"./dist/cjs/index.cjs.js"},"./style":"./dist/index.css"},"_npmUser":{"name":"bowenyao-ui","email":"15771799938@163.com"},"jsdelivr":"./dist/umd/index.umd.js","_npmVersion":"10.9.2","description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/my-component_0.0.8_1774864602851_0.8949417459382258","host":"s3://npm-registry-packages-npm-production"}},"0.0.9":{"name":"@bowenyao/my-component","version":"0.0.9","_id":"@bowenyao/my-component@0.0.9","maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"dist":{"shasum":"d02607ad96474af9e56a35456009394f747b695a","tarball":"https://registry.npmjs.org/@bowenyao/my-component/-/my-component-0.0.9.tgz","fileCount":7,"integrity":"sha512-mFsFvaDo8ccblOR5QEVf6zhgY8rl7vrHjjtOYoQt+sPan+YIrNjR9f1pTdDwBC2G6RFPThdM2eIJs6tbHcTzEA==","signatures":[{"sig":"MEYCIQD+I9M3vHv82F9Xn9b5+jPaPqFZQ8ORv2i411WRIhLXbQIhANXjoF6xaUF/F8A8gaQiC63qjZhhavLr6n/2uhr1abqc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14187},"main":"./dist/cjs/index.cjs.js","type":"module","unpkg":"./dist/umd/index.umd.js","module":"./dist/es/index.es.js","exports":{".":{"import":"./dist/es/index.es.js","script":"./dist/umd/index.umd.js","require":"./dist/cjs/index.cjs.js"},"./style":"./dist/index.css"},"_npmUser":{"name":"bowenyao-ui","email":"15771799938@163.com"},"jsdelivr":"./dist/umd/index.umd.js","_npmVersion":"10.9.2","description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/my-component_0.0.9_1774864816286_0.04942873038871931","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@bowenyao/my-component","version":"0.1.0","_id":"@bowenyao/my-component@0.1.0","maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"dist":{"shasum":"43a244dd31c5863e41507fcc1a28d29fa7def8d4","tarball":"https://registry.npmjs.org/@bowenyao/my-component/-/my-component-0.1.0.tgz","fileCount":7,"integrity":"sha512-5Oa6aFB8XFbqTk3b1/jXbc0rL2rWGu7HEk7ddamcx7VYcnturLjs4dqreIFdcRoh23TH7FbHx4PSH1r2rV6TBw==","signatures":[{"sig":"MEQCICffoeb3T5hKiVCjNLAvSlNFWQNZ4Bt0C2pjJEOBIJ0sAiA39ycoiHAjK6bvkKuRF2ccbgA8KLy9lLXXrQzCNtCW8Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14187},"main":"./dist/cjs/index.cjs.js","type":"module","unpkg":"./dist/umd/index.umd.js","module":"./dist/es/index.es.js","exports":{".":{"import":"./dist/es/index.es.js","script":"./dist/umd/index.umd.js","require":"./dist/cjs/index.cjs.js"},"./style":"./dist/index.css"},"_npmUser":{"name":"bowenyao-ui","email":"15771799938@163.com"},"jsdelivr":"./dist/umd/index.umd.js","_npmVersion":"10.9.2","description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/my-component_0.1.0_1774919262319_0.542346426581872","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bowenyao/my-component","version":"0.1.1","_id":"@bowenyao/my-component@0.1.1","maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"dist":{"shasum":"0d8d495fa33635d2352994b41cfe5eddf6694262","tarball":"https://registry.npmjs.org/@bowenyao/my-component/-/my-component-0.1.1.tgz","fileCount":2,"integrity":"sha512-eBN6KCI4v+wBturO49PMA3UL3Cw/H+EBSxldrSG27eqP0+EZBC1qoWkdvoyYR9gEgkqTj3ZlaSyUJFMQzcjOng==","signatures":[{"sig":"MEYCIQCSRQ9z53BR/R+fOeWwLbSNrcA3X+4ElRGcvOK7Ed+zbAIhAN/Dem0uxe8AI7ZisqEG8+YBOwDRoKbv/Yp9q3ei9f68","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7333},"main":"./dist/cjs/index.cjs.js","type":"module","unpkg":"./dist/umd/index.umd.js","module":"./dist/es/index.es.js","exports":{".":{"import":"./dist/es/index.es.js","script":"./dist/umd/index.umd.js","require":"./dist/cjs/index.cjs.js"},"./style":"./dist/index.css"},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"bowenyao-ui","email":"15771799938@163.com"},"jsdelivr":"./dist/umd/index.umd.js","_npmVersion":"10.9.2","description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","directories":{},"_nodeVersion":"22.15.0","dependencies":{"vue":"^3.5.29","pinia":"^3.0.4","vue-router":"^5.0.4","element-plus":"^2.13.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","@vitejs/plugin-vue":"^6.0.4","vite-plugin-static-copy":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/my-component_0.1.1_1774920457950_0.33388518607359496","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bowenyao/my-component","version":"0.1.2","_id":"@bowenyao/my-component@0.1.2","maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"dist":{"shasum":"d97d5caf4e1a46a0941cfe61c674739eed536400","tarball":"https://registry.npmjs.org/@bowenyao/my-component/-/my-component-0.1.2.tgz","fileCount":2,"integrity":"sha512-t3hAI65OmkOCryFXY+rSa0GEpZBX6+iH5/s/JbWb+lTHUwdxr/iM6Mzg7EU9CXJ1wsJwTEr64hx6IIsI8NZt5A==","signatures":[{"sig":"MEMCHieJ9jhxOyzEK1Eg/xEVC99FsAOcpPSuodttlMr2YwIhAMLrPpgPt/PI0fr6hU+xCVd41D9+u5Sf9duxDqW+7jAQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":7333},"main":"./dist/cjs/index.cjs.js","type":"module","unpkg":"./dist/umd/index.umd.js","module":"./dist/es/index.es.js","exports":{".":{"import":"./dist/es/index.es.js","script":"./dist/umd/index.umd.js","require":"./dist/cjs/index.cjs.js"},"./style":"./dist/index.css"},"scripts":{"dev":"vite","build":"vite build","preview":"vite preview"},"_npmUser":{"name":"bowenyao-ui","email":"15771799938@163.com"},"jsdelivr":"./dist/umd/index.umd.js","_npmVersion":"10.9.2","description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","directories":{},"_nodeVersion":"22.15.0","dependencies":{"vue":"^3.5.29","pinia":"^3.0.4","vue-router":"^5.0.4","element-plus":"^2.13.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^7.3.1","@vitejs/plugin-vue":"^6.0.4","vite-plugin-static-copy":"^3.2.0"},"_npmOperationalInternal":{"tmp":"tmp/my-component_0.1.2_1774921067951_0.4288792642891339","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bowenyao/my-component","version":"0.1.3","_id":"@bowenyao/my-component@0.1.3","maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"dist":{"shasum":"4ad4f31f328215026bcee567d3c5c539acad7a59","tarball":"https://registry.npmjs.org/@bowenyao/my-component/-/my-component-0.1.3.tgz","fileCount":7,"integrity":"sha512-qBDbT3AvmyWKbtDmU/xt8I54GJ1E4aVbyquoDmSfrl+44uvRqhMV6HzZw0dR9/qwYs0UR85mlPayHimwtFhn2w==","signatures":[{"sig":"MEUCIQCg5JDfIaaBtrMUIoGZWJBWZA9J0ZJzRjU1iEImszk1fgIgbG3ucgfFn6HOzHerkyo3dFd8CokSiLae17mdm9LzvI4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14187},"main":"./dist/cjs/index.cjs.js","type":"module","unpkg":"./dist/umd/index.umd.js","module":"./dist/es/index.es.js","exports":{".":{"import":"./dist/es/index.es.js","script":"./dist/umd/index.umd.js","require":"./dist/cjs/index.cjs.js"},"./style":"./dist/index.css"},"_npmUser":{"name":"bowenyao-ui","email":"15771799938@163.com"},"jsdelivr":"./dist/umd/index.umd.js","_npmVersion":"10.9.2","description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","directories":{},"_nodeVersion":"22.15.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/my-component_0.1.3_1774921217838_0.8865024895391671","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@bowenyao/my-component","version":"0.1.4","type":"module","main":"./dist/cjs/index.cjs.js","module":"./dist/es/index.es.js","unpkg":"./dist/umd/index.umd.js","jsdelivr":"./dist/umd/index.umd.js","exports":{".":{"script":"./dist/umd/index.umd.js","import":"./dist/es/index.es.js","require":"./dist/cjs/index.cjs.js"},"./style":"./dist/index.css"},"publishConfig":{"access":"public"},"_id":"@bowenyao/my-component@0.1.4","description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","_nodeVersion":"22.15.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-uBKvj7m6ZBEQVWYry3PITUYf5/qS+zjY4QdvtGNUUOhzCqAuE207VstegY/1w4BHKPlg16xzFltqRxip3nTTbw==","shasum":"6c8a306bdd9163889fbe0895292e2aeceededb1b","tarball":"https://registry.npmjs.org/@bowenyao/my-component/-/my-component-0.1.4.tgz","fileCount":7,"unpackedSize":12981,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCRkYgmkIzbgmsdlCe+b3pVJ0ZFGBS0ohHI5HYu19w3wAIgAR3K/8wDEzeQ/RCmz4je5QsqyS/4EuLJsZz1siOAMuY="}]},"_npmUser":{"name":"bowenyao-ui","email":"15771799938@163.com"},"directories":{},"maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/my-component_0.1.4_1774921344304_0.12396370532604828"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-30T08:48:52.747Z","modified":"2026-03-31T01:42:24.596Z","0.0.6":"2026-03-30T08:48:52.965Z","0.0.7":"2026-03-30T09:03:19.341Z","0.0.8":"2026-03-30T09:56:43.036Z","0.0.9":"2026-03-30T10:00:16.428Z","0.1.0":"2026-03-31T01:07:42.534Z","0.1.1":"2026-03-31T01:27:38.095Z","0.1.2":"2026-03-31T01:37:48.084Z","0.1.3":"2026-03-31T01:40:17.995Z","0.1.4":"2026-03-31T01:42:24.445Z"},"description":"这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。","maintainers":[{"name":"bowenyao-ui","email":"15771799938@163.com"}],"readme":"# My Component\n\n这是一个基于 Vue 3 + Vite 开发的可复用公共组件库。\n\n## ✨ 特性\n\n- 🎨 支持 Vue 3 Composition API\n- 📦 多种打包格式（ESM, CJS, UMD, IIFE）\n- 🎯 开箱即用的插件式安装\n- 🌐 支持通过 npm、CDN 等多种方式引入\n- 💅 支持样式独立导入\n- 🔧 基于 Vite 构建工具\n\n## 📦 安装\n\n### npm 安装\n\n```bash\nnpm install @bowenyao/my-component\n```\n\n### yarn 安装\n\n```bash\nyarn add @bowenyao/my-component\n```\n\n### pnpm 安装\n\n```bash\npnpm add @bowenyao/my-component\n```\n\n## 🚀 使用方法\n\n### 方式一：完整安装（推荐）\n\n```javascript\nimport { createApp } from 'vue'\nimport App from './App.vue'\nimport MyComponent from '@bowenyao/my-component'\n\nconst app = createApp(App)\napp.use(MyComponent)\napp.mount('#app')\n```\n\n在模板中使用：\n\n```vue\n<template>\n  <MyComponent />\n</template>\n```\n\n### 方式二：按需引入单个组件\n\n```javascript\nimport { MyComponent } from '@bowenyao/my-component'\n\nexport default {\n  components: {\n    MyComponent\n  }\n}\n```\n\n### 方式三：通过 CDN 使用（适用于非构建项目）\n\n```html\n<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"UTF-8\">\n  <title>MyComponent Demo</title>\n  <script src=\"https://unpkg.com/vue@3/dist/vue.global.js\"></script>\n  <script src=\"https://unpkg.com/@bowenyao/my-component/dist/umd/index.umd.js\"></script>\n  <link rel=\"stylesheet\" href=\"https://unpkg.com/@bowenyao/my-component/dist/index.css\">\n</head>\n<body>\n  <div id=\"app\">\n    <MyComponent />\n  </div>\n  <script>\n    const { createApp } = Vue\n    const { MyComponent } = window.MyComponent\n    \n    createApp().use(MyComponent).mount('#app')\n  </script>\n</body>\n</html>\n```\n\n### 引入样式\n\n如果组件有独立样式，可以单独引入：\n\n```javascript\nimport '@bowenyao/my-component/dist/style'\n```\n\n或\n\n```javascript\nimport '@bowenyao/my-component/dist/index.css'\n```\n\n## 🏗️ 打包说明\n\n### 打包命令\n\n```bash\n# 开发模式\npnpm dev\n\n# 生产构建\npnpm build\n\n# 预览构建结果\npnpm preview\n```\n\n### 打包配置说明\n\n本项目使用 Vite 进行打包，支持以下格式：\n\n- **ESM (ES Module)**: `dist/es/index.es.js` - 用于现代打包工具（webpack, rollup, vite）\n- **CJS (CommonJS)**: `dist/cjs/index.cjs.js` - 用于 Node.js 环境\n- **UMD**: `dist/umd/index.umd.js` - 通用格式，支持 AMD、CommonJS 和全局变量\n- **IIFE**: `dist/iife/index.iife.js` - 立即执行函数，用于浏览器直接引用\n\n### package.json 字段说明\n\n```json\n{\n  \"name\": \"@bowenyao/my-component\",           // 包名\n  \"version\": \"0.0.6\",                     // 版本号\n  \"type\": \"module\",                       // 模块类型\n  \"main\": \"./dist/cjs/index.cjs.js\",      // CommonJS 入口\n  \"module\": \"./dist/es/index.es.js\",      // ESM 入口\n  \"unpkg\": \"./dist/umd/index.umd.js\",     // unpkg CDN 入口\n  \"jsdelivr\": \"./dist/umd/index.umd.js\",  // jsdelivr CDN 入口\n  \"exports\": {                            // 导出配置\n    \".\": {\n      \"script\": \"./dist/umd/index.umd.js\",\n      \"import\": \"./dist/es/index.es.js\",\n      \"require\": \"./dist/cjs/index.cjs.js\"\n    },\n    \"./style\": \"./dist/index.css\"         // 样式导出\n  },\n  \"files\": [\"dist\"],                      // 发布到 npm 的文件\n  \"publishConfig\": {\n    \"access\": \"public\"                    // 公开包\n  }\n}\n```\n\n### Vite 配置关键点\n\n1. **多格式打包**: 通过 `lib.formats` 配置输出多种格式\n2. **外部依赖**: 将 `vue` 和 `element-plus` 标记为外部依赖，避免重复打包\n3. **静态资源复制**: 使用 `vite-plugin-static-copy` 复制 package.json 和 README.md\n4. **CSS 独立输出**: 样式文件输出到 `dist/index.css`\n\n## 📤 发布到 npm\n\n### 1. 准备工作\n\n确保你有 npm 账号，如果没有请先注册：\n```bash\nnpm adduser\n```\n\n### 2. 登录 npm\n\n```bash\nnpm login\n```\n\n### 3. 构建项目\n\n```bash\npnpm build\n```\n\n### 4. 发布\n\n```bash\n# 正式发布\nnpm publish\n\n# 或使用 pnpm\npnpm publish\n```\n\n### 5. 更新版本号\n\n修改 `package.json` 中的 `version` 字段，或使用命令：\n\n```bash\n# 补丁版本（0.0.x）\nnpm version patch\n\n# 次版本（0.x.0）\nnpm version minor\n\n# 主版本（x.0.0）\nnpm version major\n```\n\n### 6. 发布作用域包\n\n由于包名是 `@bowenyao/my-component`（作用域包），确保：\n\n1. `publishConfig.access` 设置为 `\"public\"`\n2. 或者创建私有作用域：`npm publish --access restricted`\n\n## 📁 目录结构\n\n```\nmy-component/\n├── src/                    # 源代码目录\n│   ├── components/         # 组件目录\n│   │   └── MyComponent.vue\n│   ├── index.js           # 入口文件\n│   ├── App.vue            # 示例应用\n│   └── main.js            # 开发入口\n├── my-component/          # 打包输出目录\n│   ├── dist/              # 构建产物\n│   │   ├── es/            # ESM 格式\n│   │   ├── cjs/           # CommonJS 格式\n│   │   ├── umd/           # UMD 格式\n│   │   ├── iife/          # IIFE 格式\n│   │   └── index.css      # 样式文件\n│   ├── package.json       # 发布用的 package.json\n│   └── README.md          # 说明文档\n├── index.html             # 开发 HTML\n├── vite.config.js         # Vite 配置文件\n├── package.json           # 项目配置\n└── README.md              # 项目说明\n```\n\n## 🔧 开发指南\n\n### 组件开发规范\n\n1. **入口文件** (`src/index.js`):\n\n```javascript\nimport MyComponent from './components/MyComponent.vue'\n\n// 导出一个带有 install 方法的对象\nconst plugin = {\n  install(app) {\n    // 注册组件名称\n    app.component('MyComponent', MyComponent)\n  }\n}\n\n// 支持单独导入组件\nplugin.MyComponent = MyComponent\n\nexport default plugin\n```\n\n2. **组件开发**: 在 `src/components/` 目录下开发 Vue 组件\n\n### 添加新组件\n\n1. 在 `src/components/` 创建新组件\n2. 在 `src/index.js` 中注册新组件\n3. 更新 `vite.config.js` 中的 `build.lib.name`\n4. 重新构建并发布\n\n## 📝 注意事项\n\n1. **版本管理**: 遵循语义化版本规范\n2. **依赖声明**: 只在 `dependencies` 中声明运行时依赖\n3. **外部依赖**: 将 `vue`、`element-plus` 等核心库标记为外部依赖\n4. **样式隔离**: 确保组件样式不会污染全局环境\n5. **文档更新**: 每次发布更新 README.md 和版本说明\n\n## 📄 License\n\nMIT","readmeFilename":"README.md"}