{"_id":"@bw-components/bw-table","_rev":"3-ba1f161c7f84aea83cb0f001e1c60fed","name":"@bw-components/bw-table","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@bw-components/bw-table","version":"1.0.0","keywords":["vue3","element-plus","table","pro-table","data-grid"],"license":"MIT","_id":"@bw-components/bw-table@1.0.0","maintainers":[{"name":"guoliwei","email":"15138005928@163.com"}],"dist":{"shasum":"5528e6c932d8cfb8f4c8f722335176acc6208194","tarball":"https://registry.npmjs.org/@bw-components/bw-table/-/bw-table-1.0.0.tgz","fileCount":7,"integrity":"sha512-smKW8+LrzbP8Eultxd4n0UHmfpSq3+GrlAhMBqmiX/Uqt+KVl21Qwtl9WKsH7ns4HEk0cMFFewzMG+AomPtejw==","signatures":[{"sig":"MEUCIHQr4Ky16E8YvlD5GUpB3lz3p7HBKoWOwsQ2iG6J0fD5AiEApYQjqCQ1Bp0drLM+waL8XRv6xUw02rJVJuO4rYthl6c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1856699},"main":"./dist/bw-table.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/bw-table.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/bw-table.js","require":"./dist/bw-table.umd.cjs"},"./style.css":"./dist/style.css"},"scripts":{"build":"vite build"},"_npmUser":{"name":"guoliwei","email":"15138005928@163.com"},"_npmVersion":"8.19.3","description":"Vue3 + Element Plus 增强表格组件，支持搜索、分页、列设置、多选等","directories":{},"_nodeVersion":"19.2.0","dependencies":{"sortablejs":"^1.15.6","vuedraggable":"^4.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","sass":"^1.82.0","vite":"^6.0.3","element-plus":"^2.9.4","@vitejs/plugin-vue":"^5.2.1","@vitejs/plugin-vue-jsx":"^4.1.1","@element-plus/icons-vue":"*"},"peerDependencies":{"vue":"^3.3.0","element-plus":"^2.4.0","@element-plus/icons-vue":"*"},"_npmOperationalInternal":{"tmp":"tmp/bw-table_1.0.0_1771913030153_0.960690224222593","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bw-components/bw-table","version":"1.0.1","keywords":["vue3","element-plus","table","pro-table","data-grid"],"license":"MIT","_id":"@bw-components/bw-table@1.0.1","maintainers":[{"name":"guoliwei","email":"15138005928@163.com"}],"dist":{"shasum":"1738b5fc623a7f03fbf2bd4eedd9119b2ab9c36a","tarball":"https://registry.npmjs.org/@bw-components/bw-table/-/bw-table-1.0.1.tgz","fileCount":7,"integrity":"sha512-C8GjuBNHCPTrIaaELGZliYjLLCBvw9KYJmGEzM6l8fm0JbM32fZiUWaaf02yrEt+377bI0GQdGp8ut83Xe9VAg==","signatures":[{"sig":"MEUCIBWZzf68prO0SZml6q0INR6hciumSzBQ25tJmmy5wnINAiEAhItHNFC+KHSY0bD6z2S6yGHzZECag7P1vSbx4/RIpFY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1856502},"main":"./dist/bw-table.umd.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/bw-table.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/bw-table.js","require":"./dist/bw-table.umd.cjs"},"./style.css":"./dist/style.css"},"scripts":{"build":"vite build"},"_npmUser":{"name":"guoliwei","email":"15138005928@163.com"},"_npmVersion":"8.19.3","description":"Vue3 + Element Plus 增强表格组件，支持搜索、分页、列设置、多选等","directories":{},"_nodeVersion":"19.2.0","_hasShrinkwrap":false,"devDependencies":{"vue":"^3.5.13","sass":"^1.82.0","vite":"^6.0.3","sortablejs":"^1.15.6","element-plus":"^2.9.4","vuedraggable":"^4.1.0","@vitejs/plugin-vue":"^5.2.1","@vitejs/plugin-vue-jsx":"^4.1.1","@element-plus/icons-vue":"*"},"peerDependencies":{"vue":"^3.3.0","element-plus":"^2.4.0","@element-plus/icons-vue":"*"},"_npmOperationalInternal":{"tmp":"tmp/bw-table_1.0.1_1772171792208_0.7713654576734088","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@bw-components/bw-table","version":"1.0.2","description":"Vue3 + Element Plus 增强表格组件，支持搜索、分页、列设置、多选等","type":"module","main":"./dist/bw-table.umd.cjs","module":"./dist/bw-table.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/bw-table.js","require":"./dist/bw-table.umd.cjs"},"./style.css":"./dist/style.css"},"scripts":{"build":"vite build"},"peerDependencies":{"vue":"^3.3.0","element-plus":"^2.4.0","@element-plus/icons-vue":"*"},"devDependencies":{"sortablejs":"^1.15.6","vuedraggable":"^4.1.0","@vitejs/plugin-vue":"^5.2.1","@vitejs/plugin-vue-jsx":"^4.1.1","sass":"^1.82.0","vite":"^6.0.3","vue":"^3.5.13","element-plus":"^2.9.4","@element-plus/icons-vue":"*"},"keywords":["vue3","element-plus","table","pro-table","data-grid"],"license":"MIT","_id":"@bw-components/bw-table@1.0.2","_nodeVersion":"19.2.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-xx3xt74UFmVUdiTlhSAPXFgDWvDlNo3TbjnqE4FtyS5OZIDZgVSDdrUsmBZiVzdBbcBLOFSuldVXtxLqOaH3kw==","shasum":"572abc50cfed3402cd5b74e9c5f6bda2d64784d0","tarball":"https://registry.npmjs.org/@bw-components/bw-table/-/bw-table-1.0.2.tgz","fileCount":7,"unpackedSize":1858557,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDMEgJ8XURitkYSmx7MoSHd7Gg50ceWejWoLEbJxkItGAIhAL/J91CW+QB5G444hSMW6Ww9TVWAgJDDnamMkMK9Hiug"}]},"_npmUser":{"name":"guoliwei","email":"15138005928@163.com"},"directories":{},"maintainers":[{"name":"guoliwei","email":"15138005928@163.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bw-table_1.0.2_1772270667373_0.03915462578688045"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-24T06:03:50.077Z","modified":"2026-02-28T09:24:27.711Z","1.0.0":"2026-02-24T06:03:50.330Z","1.0.1":"2026-02-27T05:56:32.466Z","1.0.2":"2026-02-28T09:24:27.567Z"},"license":"MIT","keywords":["vue3","element-plus","table","pro-table","data-grid"],"description":"Vue3 + Element Plus 增强表格组件，支持搜索、分页、列设置、多选等","maintainers":[{"name":"guoliwei","email":"15138005928@163.com"}],"readme":"# @your-scope/pro-table\r\n\r\nVue3 + Element Plus 增强表格组件，支持搜索表单、分页、列设置、多选、拖拽排序等。\r\n\r\n## 安装\r\n\r\n```bash\r\nnpm i @your-scope/pro-table\r\n# 或\r\npnpm add @your-scope/pro-table\r\n```\r\n\r\n**依赖**：请确保项目已安装 `vue@^3.3`、`element-plus@^2.4`、`@element-plus/icons-vue`。表格内部使用 `sortablejs`、`vuedraggable`，已作为 dependencies 安装。\r\n\r\n**样式**：包内已包含 ProTable 所需的全局样式（`.card`、`.table-main`、`.table-search`、`.table-header` 等），引入包样式后即可正常显示，无需在业务项目中再写一套。若项目已定义 `--gray-*` 等变量，会优先使用项目的；未定义时使用 Element Plus 变量作为 fallback。\r\n\r\n## 使用\r\n\r\n### 全局注册\r\n\r\n```js\r\nimport ProTable from \"@your-scope/pro-table\";\r\nimport \"@your-scope/pro-table/style.css\"; // 若有打包样式\r\n\r\napp.component(\"ProTable\", ProTable);\r\n```\r\n\r\n### 按需使用\r\n\r\n```vue\r\n<template>\r\n  <ProTable\r\n    :columns=\"columns\"\r\n    :request-api=\"getList\"\r\n    row-key=\"id\"\r\n  />\r\n</template>\r\n<script setup>\r\nimport ProTable from \"@your-scope/pro-table\";\r\nimport \"@your-scope/pro-table/style.css\";\r\n\r\nconst columns = [\r\n  { prop: \"name\", label: \"姓名\", search: { el: \"input\" } },\r\n  { prop: \"status\", label: \"状态\", enum: statusOptions, tag: true },\r\n  { prop: \"operation\", label: \"操作\", fixed: \"right\" },\r\n];\r\nconst getList = (params) => api.getList(params); // 需返回 { data, totalElements }\r\n</script>\r\n```\r\n\r\n### 权限按钮（可选）\r\n\r\n若需要与项目权限体系对接（操作列按钮权限），在 ProTable 外层 provide 当前页允许的按钮码列表：\r\n\r\n```js\r\nimport { ref } from \"vue\";\r\nconst authButtons = ref([\"add\", \"edit\", \"delete\"]); // 从权限接口或 store 获取\r\nprovide(\"proTableAuthButtons\", authButtons);\r\n```\r\n\r\n不 provide 时，操作列所有按钮均展示。\r\n\r\n## Props / 事件 / 插槽\r\n\r\n与现有 ProTable 保持一致，如：`columns`、`requestApi`、`requestAuto`、`pagination`、`rowKey`、`searchCol`、`toolButton` 等；事件 `search`、`reset`、`dargSort`、`create`；插槽 `tableHeader`、`selectButton`、`pagination`、`empty` 及各列插槽。\r\n\r\n## 构建与发布 npm\r\n\r\n在 `packages/pro-table` 目录下：\r\n\r\n```bash\r\npnpm install\r\npnpm build\r\n```\r\n\r\n发布前请将 `package.json` 中 `name` 改为你的 scope 或包名（如 `@myorg/pro-table` 或 `my-pro-table`），然后：\r\n\r\n```bash\r\nnpm login\r\nnpm publish\r\n```\r\n\r\n若为 scoped 且公开发布：`npm publish --access public`。\r\n\r\n## 从当前项目迁移\r\n\r\n若从本仓库的 `src/components/ProTable` 迁移到该包，只需将页面中的：\r\n\r\n- `import ProTable from \"@/components/ProTable/index.vue\"`  \r\n改为  \r\n- `import ProTable from \"@your-scope/pro-table\"`  \r\n并引入样式（若需要）。列配置、API 入参/出参、插槽名保持不变即可。\r\n","readmeFilename":"README.md"}