{"_id":"@csofti-andy/ci-web-plugins-commom","name":"@csofti-andy/ci-web-plugins-commom","dist-tags":{"latest":"1.0.15"},"versions":{"1.0.15":{"name":"@csofti-andy/ci-web-plugins-commom","private":false,"version":"1.0.15","license":"MIT","author":{"name":"Andy Huang","email":"57237184@qq.com"},"type":"module","scripts":{"dev":"vite","build":"rollup -c rollup.config.js","buildvite":"vue-tsc -b && vite build","lib":"vite build --config vite.config.ts","preview":"vite preview"},"peerDependencies":{"axios":"^1.10.0","dayjs":"^1.11.13","element-plus":"^2.10.2","vxe-table":"4.13.37","dhtmlx-gantt":"^8.0.11"},"devDependencies":{"@rollup/plugin-alias":"^5.1.1","@rollup/plugin-commonjs":"^28.0.3","@rollup/plugin-json":"^6.1.0","@rollup/plugin-node-resolve":"^16.0.1","@vitejs/plugin-vue":"^5.2.3","@vue/tsconfig":"^0.7.0","autoprefixer":"^10.4.21","postcss":"^8.5.4","rollup":"^4.43.0","rollup-plugin-copy":"^3.5.0","rollup-plugin-css-only":"^4.5.2","rollup-plugin-postcss":"^4.0.2","rollup-plugin-terser":"^7.0.2","rollup-plugin-vue":"^6.0.0","sass":"^1.89.2","tailwindcss":"^3.4.1","typescript":"~5.8.3","vite":"^6.3.5","vite-plugin-lazy-import":"^1.0.7","vue-tsc":"^2.2.8"},"publishConfig":{"access":"public"},"exports":{".":{"import":"./dist/index/index.js"},"./HelloPlugin":{"import":"./dist/HelloPlugin/index.js"},"./HelloWorld":{"import":"./dist/HelloWorld/index.js"},"./VxeTablePro":{"import":"./dist/VxeTablePro/index.js"},"./VxeGridPro":{"import":"./dist/VxeGridPro/index.js"},"./VxeModalPro":{"import":"./dist/VxeModalPro/index.js"},"./SearchPro":{"import":"./dist/SearchPro/index.js"},"./DhtmlxGanttPro":{"import":"./dist/DhtmlxGanttPro/index.js"},"./dist/CI.Web.Plugins.Commom.css":"./dist/CI.Web.Plugins.Commom.css","./css":"./dist/CI.Web.Plugins.Commom.css"},"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","dependencies":{"@cimom/ci-web-plugins-commom":"^1.0.12","axios":"^1.10.0","dayjs":"^1.11.13","element-plus":"^2.10.2","vue":"^3.5.13","vxe-table":"4.13.37","dhtmlx-gantt":"^8.0.11"},"_id":"@csofti-andy/ci-web-plugins-commom@1.0.15","description":"新插件目录:components/SearchPro 1.添加测试案例 在目录testPlugins/,参考已有插件测试案例 2.添加新插件在entries目下的入口文件 3.添加新插件在rollup.config.js构建的配置 4.添加新插件README.md 使用说明文档 5.添加新插件src/index.js的导出暴露插件 6.添加新插件在package.json的默认导出配置","_nodeVersion":"24.6.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-gH5QZ3NeLornULZAXVfEfmyl46TcNZElymhfMsDOIGKmp3z899a3LuH9uDv3l+QzCWrViMQjQUu1clr5v5xScw==","shasum":"ddc723a1e1067d4cd0cdce8a7fcd6ec73a27db19","tarball":"https://registry.npmjs.org/@csofti-andy/ci-web-plugins-commom/-/ci-web-plugins-commom-1.0.15.tgz","fileCount":53,"unpackedSize":254723,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF5uzopOZDkqB1Nvf8R9v//mUmPnH8Hy6KP2OCksaQgGAiEAvkPc8hkuS+YhGK4HFk0KoI9tGbL/X3gbSvLhhM4ornQ="}]},"_npmUser":{"name":"hdeqi2005","email":"57237184@qq.com"},"directories":{},"maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ci-web-plugins-commom_1.0.15_1767779502222_0.7347254181064979"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-07T09:51:42.110Z","1.0.15":"2026-01-07T09:51:42.367Z","modified":"2026-01-07T09:51:42.653Z"},"maintainers":[{"name":"hdeqi2005","email":"57237184@qq.com"}],"description":"新插件目录:components/SearchPro 1.添加测试案例 在目录testPlugins/,参考已有插件测试案例 2.添加新插件在entries目下的入口文件 3.添加新插件在rollup.config.js构建的配置 4.添加新插件README.md 使用说明文档 5.添加新插件src/index.js的导出暴露插件 6.添加新插件在package.json的默认导出配置","author":{"name":"Andy Huang","email":"57237184@qq.com"},"license":"MIT","readme":"# 新插件添加及构建注意事项\n新插件目录:components/SearchPro\n1.添加测试案例 在目录testPlugins/,参考已有插件测试案例\n2.添加新插件在entries目下的入口文件\n3.添加新插件在rollup.config.js构建的配置\n4.添加新插件README.md 使用说明文档\n5.添加新插件src/index.js的导出暴露插件\n6.添加新插件在package.json的默认导出配置\n\n# Vue3 插件模板\n\n本项目为基于 Vite + Vue3 + JavaScript + TailwindCSS 的插件开发模板，适用于发布到 NPM。\n\n## 快速开始\n\n```bash\nnpm install @cimom/ci-web-plugins-commom\n```\n\n## 打包与发布\n\n### 打包\n```bash\nnpm run build\n```\n\n### 发布到 NPM\n1. 修改 `package.json` 中的 `name`、`version`、`description` 等信息。\n2. 确认 `main`、`module`、`types` 字段已指向 `dist/` 下的对应文件。\n3. 执行：\n   ```bash\n   npm publish\n   ```\n   查看 npm config get registry https://registry.npmmirror.com/\n   > 建议发布前切换为 npm 官方源：`npm config set registry https://registry.npmjs.org/`\n\n## 插件使用说明\n\n### 1. NPM 安装方式\n```bash\nnpm install @cimom/ci-web-plugins-commom\n```\n\n#### 在 Vue3 项目中使用\n**全局注册：**\n```js\n// main.ts 或 main.js\nimport { createApp } from 'vue'\nimport App from './App.vue'\nimport { HelloPlugin, HelloWorld, VxeTablePro } from '@cimom/ci-web-plugins-commom'\nimport '@cimom/ci-web-plugins-commom/dist/CI.Web.Plugins.Commom.css'\n\nconst app = createApp(App)\napp.component('HelloPlugin', HelloPlugin)\napp.component('HelloWorld', HelloWorld)\napp.component('VxeTablePro', VxeTablePro)\napp.mount('#app')\n```\n\n**局部注册：**\n```vue\n<script setup>\nimport { HelloPlugin, HelloWorld, VxeTablePro } from '@cimom/ci-web-plugins-commom'\nimport '@cimom/ci-web-plugins-commom/dist/CI.Web.Plugins.Commom.css'\n</script>\n\n<template>\n  <HelloPlugin msg1=\"Vite + Vue\" />\n  <HelloWorld msg=\"Vite222 + Vue\" />\n  <VxeTablePro />\n</template>\n```\n\n\n#### UMD 方式（适合 script 标签直接引入）\n```html\n<script src=\"./dist/CI.Web.Plugins.Commom.umd.js\"></script>\n<link rel=\"stylesheet\" href=\"./dist/CI.Web.Plugins.Commom.css\" />\n<script>\n  const { HelloPlugin, HelloWorld, VxeTablePro } = window.CIWebPluginsCommom;\n  // 通过 window.CIWebPluginsCommom 访问导出组件\n</script>\n```\n\n> **注意：**\n> - 组件名称和导出对象以实际 dist 产物为准。\n> - 样式文件需手动引入。\n\n### 3. 单独引入组件（推荐）\n\n自 v1.0.4+ 起，支持通过 `exports` 字段单独引入组件：\n\n```js\nimport HelloPlugin from '@cimom/ci-web-plugins-commom/HelloPlugin'\nimport VxeTablePro from '@cimom/ci-web-plugins-commom/VxeTablePro'\nimport '@cimom/ci-web-plugins-commom/dist/CI.Web.Plugins.Commom.css'\n```\n\n- 只会打包用到的组件，减少体积。\n- 也可用于局部注册：\n\n```vue\n<script setup>\nimport HelloWorld from '@cimom/ci-web-plugins-commom/HelloWorld'\n</script>\n<template>\n  <HelloWorld msg=\"单独引入\" />\n</template>\n```\n\n> 依赖 `package.json` 的 `exports` 字段，需升级到支持该特性的 npm/yarn 版本。\n\n### NPM 用户使用方式\n```bash\nnpm install @cimom/ci-web-plugins-commom\n```\n在项目入口引入：\n```js\nimport {HelloPlugin,HelloWorld} from '@cimom/ci-web-plugins-commom'\nimport '@cimom/ci-web-plugins-commom/dist/CI.Web.Plugins.Commom.css'\n```\n## 开发使用案例:\n```\n<script setup>\n import HelloPlugin from './components/HelloPlugin.vue'\n import HelloWorld from './components/HelloWorld.vue'\n</script>\n\n<template>\n  <HelloPlugin msg1=\"Vite + Vue\" />\n  <HelloWorld msg=\"Vite222 + Vue\" />\n</template>\n\n<style scoped>\n\n</style>\n```\n\n## 注意事项\n- `main`、`module`、`types` 字段必须指向 `dist/` 下的构建产物，不能指向 `src/`。\n- 发布前请确保已执行 `npm run build`，并包含 `dist/` 目录。\n- TailwindCSS 原子类会自动按组件使用情况生成，无需手动引入。\n- 如需自定义样式，请在 `src/index.css` 中添加。\n- 推荐在 `peerDependencies` 中声明 `vue` 版本要求。\n\n## 主要特性\n- Vue3 组件开发\n- JavaScript 支持\n- TailwindCSS 集成\n- 可直接作为插件发布\n\n## 目录结构\n- `src/index.ts` 插件入口\n- `src/index.css` 插件样式入口\n\n## 参考\n- [Vite](https://vitejs.dev/)\n- [Vue3](https://vuejs.org/)\n- [TailwindCSS](https://tailwindcss.com/)\n\n## 使用区别\n### 1.获取实列的方式\nonMounted(() => {\n  const $table = tableRef.value && tableRef.value.Instance()\n  const $toolbar = toolbarRef.value\n  if ($table && $toolbar) {\n    $table.connect($toolbar)\n  }\n})\n### 2.事件\n\n","readmeFilename":"README.md","_rev":"1-6027c29f02ab9baed09e2e7e296df042"}