{"id":13458549,"url":"https://github.com/jiangshanmeta/vue-admin","last_synced_at":"2025-05-07T17:50:49.511Z","repository":{"id":23076516,"uuid":"98075615","full_name":"jiangshanmeta/vue-admin","owner":"jiangshanmeta","description":"基于vue的针对admin应用的low code解决方案","archived":false,"fork":false,"pushed_at":"2024-03-28T10:09:05.000Z","size":5319,"stargazers_count":169,"open_issues_count":2,"forks_count":38,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-04-15T08:10:11.502Z","etag":null,"topics":["lowcode","vue","vue-admin"],"latest_commit_sha":null,"homepage":"https://jiangshanmeta.github.io/vue-admin/","language":"Vue","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/jiangshanmeta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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":"2017-07-23T04:58:50.000Z","updated_at":"2024-05-02T16:56:24.223Z","dependencies_parsed_at":"2023-01-13T22:43:13.467Z","dependency_job_id":"b201d72d-d73b-4505-acc9-a0eca429649a","html_url":"https://github.com/jiangshanmeta/vue-admin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiangshanmeta%2Fvue-admin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiangshanmeta%2Fvue-admin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiangshanmeta%2Fvue-admin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jiangshanmeta%2Fvue-admin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jiangshanmeta","download_url":"https://codeload.github.com/jiangshanmeta/vue-admin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931391,"owners_count":21827104,"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":["lowcode","vue","vue-admin"],"created_at":"2024-07-31T09:00:53.715Z","updated_at":"2025-05-07T17:50:49.491Z","avatar_url":"https://github.com/jiangshanmeta.png","language":"Vue","funding_links":[],"categories":["Vue","![Open Source Love svg3](https://badges.frapsoft.com/os/v3/open-source.svg?v=103)"],"sub_categories":[],"readme":"# vue-admin\n\n本项目提供了一个针对后台admin应用的low code解决方案。\n\n热烈庆祝本项目被[awesome-lowcode](https://github.com/taowen/awesome-lowcode)收录\n\n## model\n\nmodel是对一个后台页面的描述，由以下几部分构成\n\n* fields 对字段的描述\n  * labelName 字段的名称\n  * [label](./src/components/common/Labels/)\n  * [editor](./src/components/common/Editors/)\n  * [view](./src/components/common/Views/)\n  * validator 表单验证用的，底层依赖async-validator,该配置项支持函数，第一个参数为整条记录，第二个参数为当前模式(create | edit)，用于支付复杂情况的校验，函数返回值是async-validator的验证配置项。这个参数支持一个特殊的值**custom**,将验证委托给具体的Editor组建，该组建需要实现一个validate方法，该方法组要返回promise。\n  * autoValidate，是否自动表单验证该字段，布尔值或者返回布尔值的函数(函数会被传入一个参数mode，为create或edit)\n  * tip tip用在Editor组件中，用于对应字段做些说明，它可以是一个函数(调用时this指向Editor组件实例，被传入一个参数mode(值为create或edit),其返回值作为显示值)，也可以是个简单值(直接作为显示值)\n  * [colspan](./src/components/common/#MetaTable)\n  * tableColumnConfig 对应el-table-column的其他配置项 一个对象 展开传递\n* pages关联页面的描述\n  * list 列表页配置\n    * [listConfig](./src/components/common#ListInfo)，列表组件的配置项\n    * [documentOperators](./src/components/common/DocumentOperators/) 针对一条记录的操作集\n    * [collectionOperators](./src/components/common/CollectionOperators/) 类似于documentOperators，但collectionOperators不针对于一条特定的记录，它对应的data是选中的数据数组。\n    * [filters](./src/components/common/Filters/)，筛选组件的配置项。\n    * [filterOperators](./src/components/common/FilterOperators/)\n  * info 详情页面 配置同DocumentOperatorInfo只是展示为页面级而不是弹窗\n  * create [新建页面](./src/components/common#MetaComponentCreate)\n\ndocumentOperators/collectionOperators/filterOperators在底层都依赖于[Operators](./src/components/common/#Operators)\n\n声明了一个model后，我们还需要在vue-router配置中指明用了哪个model，因而用到了vue-router的meta属性。\n\n## 组件命名规则\n\n整体风格为PascalCase。\n\n本系统把组件分为Editor、Filter、View、Label、DocumentOperator、CollectionOperator、FilterOperator七大类，分属于这七大类的组件应以对应的类型作为组件名前缀。\n\n对于Editor、Filter组件，优先描述数据结构，然后是前端特殊功能，最后是前端展示。\n\n对于只会用一次的组件，采用组件类型+model名+字段名的形式\n\n## 写model的tip\n\n* 一般而言，一个model对应和一个后端model(对应一张表)对应，但实际上不一定。\n* 一个model的内容不一定要放在一个文件中，可以放在多个文件中最后组合\n* 一个具体的业务系统可能有非常多的相似配置项，可以写成辅助函数来生成这些配置(类似于redux的action，本身只是对象，但是可以有action creator)\n* 如果通过MetaPage页面级组件使用model, 会默认把model深度freeze优化性能。deepFreeze情况下如果model中有同步引用的组件(不是通过动态import)，需要手动使用Vue.extend转换为Vue子类，否则Vue自动调用extend将配置对象转换为子类时，由于配置对象被冻结转换为子类失败。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiangshanmeta%2Fvue-admin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjiangshanmeta%2Fvue-admin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjiangshanmeta%2Fvue-admin/lists"}