{"id":15019514,"url":"https://github.com/wakeadmin/components","last_synced_at":"2025-06-19T09:41:41.655Z","repository":{"id":174130510,"uuid":"651821491","full_name":"wakeadmin/components","owner":"wakeadmin","description":"组件库","archived":false,"fork":false,"pushed_at":"2024-06-26T08:20:55.000Z","size":136693,"stargazers_count":16,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T18:53:47.406Z","etag":null,"topics":["components","element-plus","element-ui","vue","vuejs2"],"latest_commit_sha":null,"homepage":"https://wakeadmin.github.io/components/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wakeadmin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-10T07:40:26.000Z","updated_at":"2025-03-06T02:51:18.000Z","dependencies_parsed_at":"2024-11-15T08:01:59.020Z","dependency_job_id":"7841c05d-0c49-4a8b-badd-cf402be70644","html_url":"https://github.com/wakeadmin/components","commit_stats":{"total_commits":756,"total_committers":6,"mean_commits":126.0,"dds":"0.16534391534391535","last_synced_commit":"68d34add311b44c76fcbccf31dd30dc3acbdec13"},"previous_names":["wakeadmin/components"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/wakeadmin/components","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakeadmin%2Fcomponents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakeadmin%2Fcomponents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakeadmin%2Fcomponents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakeadmin%2Fcomponents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wakeadmin","download_url":"https://codeload.github.com/wakeadmin/components/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wakeadmin%2Fcomponents/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260726604,"owners_count":23053188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["components","element-plus","element-ui","vue","vuejs2"],"created_at":"2024-09-24T19:53:38.127Z","updated_at":"2025-06-19T09:41:36.636Z","avatar_url":"https://github.com/wakeadmin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wakeadmin 组件库\n\n\u003e 当前项目正处于开发中，欢迎大家提出宝贵的意见和建议，我们会认真对待，谢谢！\n\n\u003e 当前组件库可能耦合了惟客的 UI 风格，你可以 Fork 并修改成你自己的风格\n\n\u003cbr\u003e\n\n`@wakeadmin/components` 是惟客数据针对管理后台开发的一套基于 Vue.js 和 Element ui 的组件库，包含了常用的组件，如表格、表单、弹窗、下拉框、日期选择器等，旨在解放管理后台端 CRUD 页面的前端生产力，大大提高开发效率。\n\n- [贡献指南](./CONTRIBUTING.md)\n- [官方文档](https://wakeadmin.wakedata.com/components-doc/index.html)\n- [如何使用](#如何使用)\n\n## 主要特性\n\n- 兼容 Vue 2 / 3\n- 兼容 Element UI / Plus\n- 加速管理后台端增删改查的页面开发, 使用声明式的方式配置页面\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## 如何使用\n\n### 安装\n\n```shell\n$ pnpm add @wakeadmin/components\n\n```\n\n如果你使用的是`Vue-Cli`，建议在 `vue.config.js` 中加入以下配置:\n\n```js\n// ...\nmodule.exports = defineConfig({\n  // 构建时转换 @wakeadmin/* 相关库，让 babel 参与转译，以符合你的兼容性需求\n  transpileDependencies: process.env.NODE_ENV === 'production' ? [/(wakeapp|wakeadmin)/] : false,\n  // ...\n});\n```\n\n\u003cbr\u003e\n\n### 初始化\n\n引入样式，并安装 Vue 插件:\n\n```js\nimport Vue from 'vue';\nimport { plugin } from '@wakeadmin/components';\n\n// 引入样式\nimport '@wakeadmin/components/style/index.scss';\n\n// vue 2.x 用法\nVue.use(plugin);\n```\n\n\u003cbr\u003e\n\n### demo\n\n开发一个简单的表格\n\n```ts\nimport { defineFatTable } from '@wakeadmin/components';\n\n/**\n * 表格项类型\n */\nexport interface Item {\n  id: number;\n  name: string;\n  createDate: number;\n}\n\nexport const MyTable = defineFatTable\u003cItem\u003e(({ column }) =\u003e {\n  return () =\u003e ({\n    // 表格数据获取\n    async request(params) {\n      const { pagination, query } = params;\n\n      const { data: list, total } = await getMyList({ ...query, ...pagination });\n\n      return {\n        total,\n        list,\n      };\n    },\n    // 删除操作\n    async remove(list, ids) {\n      await removeItem(ids);\n    },\n    // 表格列\n    columns: [\n      // queryable 标记为查询字段\n      column({ prop: 'name', label: '名称', queryable: true }),\n      column({ prop: 'createDate', valueType: 'date-range', label: '创建时间', queryable: true }),\n      column({\n        type: 'actions',\n        actions: (table, row) =\u003e [{ name: '编辑' }, { name: '删除', onClick: () =\u003e table.remove(row) }],\n      }),\n    ],\n  });\n});\n```\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwakeadmin%2Fcomponents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwakeadmin%2Fcomponents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwakeadmin%2Fcomponents/lists"}