From 205da68af351a0681393c7f13c60608e42e95578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Mon, 23 Sep 2019 23:01:18 +0800 Subject: [PATCH] add description --- .script/genBlockConfig.js | 94 +++++ AccountCenter/package.json | 2 +- AccountSettings/package.json | 2 +- DashboardAnalysis/package.json | 2 +- DashboardMonitor/package.json | 2 +- DashboardWorkplace/package.json | 2 +- EditorFlow/package.json | 2 +- EditorKoni/package.json | 2 +- EditorMind/package.json | 2 +- Exception403/package.json | 2 +- Exception404/package.json | 2 +- Exception500/package.json | 2 +- FormAdvancedForm/package.json | 2 +- FormBasicForm/package.json | 2 +- FormStepForm/package.json | 2 +- ListBasicList/package.json | 2 +- ListCardList/package.json | 2 +- ListSearch/package.json | 2 +- ListSearchApplications/package.json | 2 +- ListSearchArticles/package.json | 2 +- ListSearchProjects/package.json | 2 +- ListTableList/package.json | 2 +- ProfileAdvanced/package.json | 2 +- ProfileBasic/package.json | 2 +- ResultFail/package.json | 2 +- ResultSuccess/package.json | 2 +- UserLogin/package.json | 2 +- UserRegister/package.json | 2 +- UserRegisterResult/package.json | 2 +- blockList.json | 510 ++++++++++++++++++++++++++++ package.json | 2 +- 31 files changed, 633 insertions(+), 29 deletions(-) create mode 100644 .script/genBlockConfig.js create mode 100644 blockList.json diff --git a/.script/genBlockConfig.js b/.script/genBlockConfig.js new file mode 100644 index 00000000..aa73f62a --- /dev/null +++ b/.script/genBlockConfig.js @@ -0,0 +1,94 @@ +const fs = require('fs'); +const { join } = require('path'); +const gitUrl = 'https://github.com/ant-design/pro-blocks'; +const tagsKey = { + list: '列表', + search: '搜索', + articles: '文章', + table: '表格', + form: '表单', + step: '步骤', + basic: '基本', + card: '卡片', + applications: '应用', + projects: '项目', + profile: '详情', + advanced: '高级', + result: '结果', + fail: '失败', + success: '成功', + user: '用户', + login: '登录', + register: '注册', + account: '账号', + center: '个人中心', + settings: '设置', + dashboard: 'dashboard', + analysis: '分析', + monitor: '监控', + workplace: '工作台', + editor: '编辑器', + flow: '流程图', + koni: '拓扑结构图', + mind: '脑图', + exception: '异常', +}; +/** + * 从文件数组映射为 pro 的路由 + * @param {*} name + */ +const genBlockName = name => + name + .match(/[A-Z]?[a-z]+|[0-9]+/g) + .map(p => p.toLowerCase()) + .join('/'); + +/** + * 从文件数组映射为 tags 列表 + * @param {*} name + */ +const genBlockTags = name => + Array.from(new Set(name.match(/[A-Z]?[a-z]+|[0-9]+/g).map(p => p.toLowerCase()))).map( + key => tagsKey[key] || key, + ); + +/** + * 遍历文件地址 + * @param path + */ +const getFolderTreeData = filePath => { + const files = fs.readdirSync(filePath); + return files + .map(fileName => { + const status = fs.statSync(join(filePath, fileName)); + // 是文件夹 并且不已 . 开头且最深三层 + if (status.isDirectory() && fileName.indexOf('.') !== 0) { + const absPkgPath = join(filePath, fileName, 'package.json'); + if (fs.existsSync(absPkgPath)) { + const pkg = require(absPkgPath); + return { + title: fileName, + value: fileName, + key: fileName, + description: pkg.description, + url: `${gitUrl}/tree/master/${fileName}`, + type: 'block', + path: fileName, + isPage: true, + defaultPath: `/${fileName}`, + img: `https://github.com/ant-design/pro-blocks/raw/master/${fileName}/snapshot.png`, + tags: genBlockTags(fileName), + name: fileName, + previewUrl: `https://preview.pro.ant.design/${genBlockName(fileName)}`, + }; + } + } + return undefined; + }) + .filter(obj => obj); +}; + +fs.writeFileSync( + join(__dirname, '..', 'blockList.json'), + JSON.stringify(getFolderTreeData(join(__dirname, '../')), null, 2), +); diff --git a/AccountCenter/package.json b/AccountCenter/package.json index b1c63a7a..ae26a132 100644 --- a/AccountCenter/package.json +++ b/AccountCenter/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/account-center", "version": "0.0.1", - "description": "AccountCenter", + "description": "个人中心一般用于暂时用户的基本信息,已经相关的信息展示。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/accountcenter" diff --git a/AccountSettings/package.json b/AccountSettings/package.json index fe4457be..d12a8592 100644 --- a/AccountSettings/package.json +++ b/AccountSettings/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/account-settings", "version": "0.0.1", - "description": "AccountSettings", + "description": "通常是用于用户设置名称、头像、用途、私密性等信息。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/accountsettings" diff --git a/DashboardAnalysis/package.json b/DashboardAnalysis/package.json index e6c257ca..b1ea3416 100644 --- a/DashboardAnalysis/package.json +++ b/DashboardAnalysis/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/analysis", "version": "0.0.1", - "description": "Analysis", + "description": "将同一主题下的多种下钻维度呈现在页面中,让用户能够研究多组数据并发现趋势,用户可操作数据,调整数据范围满足更精准的分析需求。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/analysis" diff --git a/DashboardMonitor/package.json b/DashboardMonitor/package.json index c4dfa942..e37c9053 100644 --- a/DashboardMonitor/package.json +++ b/DashboardMonitor/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/monitor", "version": "0.0.1", - "description": "Monitor", + "description": "常用于数据报表细节信息的展示,根据业务诉求可配置文本、列表、可视化图表等。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/monitor" diff --git a/DashboardWorkplace/package.json b/DashboardWorkplace/package.json index 952900b3..f1d59113 100644 --- a/DashboardWorkplace/package.json +++ b/DashboardWorkplace/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/workplace", "version": "0.0.1", - "description": "Workplace", + "description": "工作台将应用中每个部分最关键的数据提取出来,在一个页面呈现,便于全局分析和决策。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/workplace" diff --git a/EditorFlow/package.json b/EditorFlow/package.json index 2fe53cfe..9d7e8cfe 100644 --- a/EditorFlow/package.json +++ b/EditorFlow/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/flow", "version": "0.0.1", - "description": "flow", + "description": "千言万语不如一张图,流程图是表示算法思路的最好方法。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/flow" diff --git a/EditorKoni/package.json b/EditorKoni/package.json index 4458f53e..f6dd9010 100644 --- a/EditorKoni/package.json +++ b/EditorKoni/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/flow", "version": "0.0.1", - "description": "flow", + "description": "拓扑结构图可以清晰展示网络节点和通信介质构成的网络结构。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/flow" diff --git a/EditorMind/package.json b/EditorMind/package.json index c135795c..6c078027 100644 --- a/EditorMind/package.json +++ b/EditorMind/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/flow", "version": "0.0.1", - "description": "flow", + "description": "脑图是表达发散性思维的有效工具,它简单却又很有效,是一种非常实用展示工具。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/flow" diff --git a/Exception403/package.json b/Exception403/package.json index 548a29e8..03eb30d5 100644 --- a/Exception403/package.json +++ b/Exception403/package.json @@ -1,7 +1,7 @@ { "name": "@pro-blocks/exception-403", "version": "0.0.1", - "description": "Exception403", + "description": "403 Forbidden 代表客户端错误,指的是服务器端有能力处理该请求,但是拒绝授权访问,一般是权限异常导致。", "repository": { "type": "git", "url": "https://github.com/ant-design/pro-blocks/tree/master/Exception403" diff --git a/Exception404/package.json b/Exception404/package.json index c6667670..309c30d5 100644 --- a/Exception404/package.json +++ b/Exception404/package.json @@ -1,7 +1,7 @@ { "name": "@pro-blocks/exception-404", "version": "0.0.1", - "description": "Exception404", + "description": "404 Not Found 代表请求失败,请求所希望得到的资源未被在服务器上发现", "repository": { "type": "git", "url": "https://github.com/ant-design/pro-blocks/tree/master/Exception404" diff --git a/Exception500/package.json b/Exception500/package.json index b264af5f..83bcb2a5 100644 --- a/Exception500/package.json +++ b/Exception500/package.json @@ -1,7 +1,7 @@ { "name": "@pro-blocks/exception-500", "version": "0.0.1", - "description": "Exception500", + "description": "500 Internal Server Error,是表示服务器端错误的响应状态码。", "repository": { "type": "git", "url": "https://github.com/ant-design/pro-blocks/tree/master/Exception500" diff --git a/FormAdvancedForm/package.json b/FormAdvancedForm/package.json index 834f0d1c..bb720978 100644 --- a/FormAdvancedForm/package.json +++ b/FormAdvancedForm/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/advanced-form", "version": "0.0.1", - "description": "AdvancedForm", + "description": "高级表单常适用于一次性输入和提交大批量数据的场景。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/advancedform" diff --git a/FormBasicForm/package.json b/FormBasicForm/package.json index ef21d21f..102b5883 100644 --- a/FormBasicForm/package.json +++ b/FormBasicForm/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/basic-form", "version": "0.0.1", - "description": "BasicForm", + "description": "表单页用于向用户收集或验证信息,基础表单常用于数据项较少的表单场景。", "main": "src/index.js", "scripts": { "dev": "umi dev" diff --git a/FormStepForm/package.json b/FormStepForm/package.json index 9ae55947..49cca73d 100644 --- a/FormStepForm/package.json +++ b/FormStepForm/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/step-form", "version": "0.0.1", - "description": "StepForm", + "description": "分布表单使用与将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成的场景。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/stepform" diff --git a/ListBasicList/package.json b/ListBasicList/package.json index 0f585943..4e53f5ad 100644 --- a/ListBasicList/package.json +++ b/ListBasicList/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/basic-list", "version": "0.0.1", - "description": "BasicList", + "description": "用于陈列一类事务性主题,用户常常将这个页面当做开始事务的入口,主要以浏览方式寻找条目。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/basiclist" diff --git a/ListCardList/package.json b/ListCardList/package.json index ac083d2e..9e202b39 100644 --- a/ListCardList/package.json +++ b/ListCardList/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/card-list", "version": "0.0.1", - "description": "CardList", + "description": "卡片组成的列表,一般用于展示有图的列表,更加美观。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/cardlist" diff --git a/ListSearch/package.json b/ListSearch/package.json index 01d33ba1..095037be 100644 --- a/ListSearch/package.json +++ b/ListSearch/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/search-list", "version": "0.0.1", - "description": "SearchListApplications", + "description": "一个基本多标签页面,用于展示搜索列表。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/searchlistapplications" diff --git a/ListSearchApplications/package.json b/ListSearchApplications/package.json index 6d6e92a2..40167ee1 100644 --- a/ListSearchApplications/package.json +++ b/ListSearchApplications/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/search-list-applications", "version": "0.0.1", - "description": "SearchListApplications", + "description": "常用于陈列某一主题下的大量条目,并提供丰富的数据筛选功能帮助用户匹配出需要的数据自己。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/searchlistapplications" diff --git a/ListSearchArticles/package.json b/ListSearchArticles/package.json index 2a0eefc8..bc815484 100644 --- a/ListSearchArticles/package.json +++ b/ListSearchArticles/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/search-list-articles", "version": "0.0.1", - "description": "SearchListArticles", + "description": "常用于陈列某一主题下的大量条目,并提供丰富的数据筛选功能帮助用户匹配出需要的数据自己。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/searchlistarticles" diff --git a/ListSearchProjects/package.json b/ListSearchProjects/package.json index adc86814..c7a74dee 100644 --- a/ListSearchProjects/package.json +++ b/ListSearchProjects/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/search-list-projects", "version": "0.0.1", - "description": "SearchListProjects", + "description": "常用于陈列某一主题下的大量条目,并提供丰富的数据筛选功能帮助用户匹配出需要的数据自己。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/searchlistprojects" diff --git a/ListTableList/package.json b/ListTableList/package.json index ad452182..182e1002 100644 --- a/ListTableList/package.json +++ b/ListTableList/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/table-list", "version": "0.0.1", - "description": "TableList", + "description": "一个标准的表格增删改查页面,可以派生出百分之八十的后台页面。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/tablelist" diff --git a/ProfileAdvanced/package.json b/ProfileAdvanced/package.json index 30170057..57966da2 100644 --- a/ProfileAdvanced/package.json +++ b/ProfileAdvanced/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/advanced-profile", "version": "0.0.1", - "description": "AdvancedProfile", + "description": "一个复杂的详情页,可以展示一个对象的基本信息和其相关的新息和操作。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/advancedprofile" diff --git a/ProfileBasic/package.json b/ProfileBasic/package.json index f561a39b..27daa553 100644 --- a/ProfileBasic/package.json +++ b/ProfileBasic/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/basic-profile", "version": "0.0.1", - "description": "BasicProfile", + "description": "详情页可以向用户展示一个对象完整的描述信息,并且可以对一个对象进行编辑操作。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/basicprofile" diff --git a/ResultFail/package.json b/ResultFail/package.json index 0866eb0d..200f3220 100644 --- a/ResultFail/package.json +++ b/ResultFail/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/result-fail", "version": "0.0.1", - "description": "ResultFail", + "description": "告知用户操作后所产生的失败结果,引导用户接下来的行动。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/resultfail" diff --git a/ResultSuccess/package.json b/ResultSuccess/package.json index 337702aa..fbfe9e8f 100644 --- a/ResultSuccess/package.json +++ b/ResultSuccess/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/result-success", "version": "0.0.1", - "description": "ResultSuccess", + "description": "告知用户操作后所产生的成功结果,引导用户接下来的行动。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/resultsuccess" diff --git a/UserLogin/package.json b/UserLogin/package.json index 0a77095f..a15614eb 100644 --- a/UserLogin/package.json +++ b/UserLogin/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/user-login", "version": "0.0.1", - "description": "UserLogin", + "description": "用户登录界面,支持用户名密码和手机号登录。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/userlogin" diff --git a/UserRegister/package.json b/UserRegister/package.json index 298eee1a..f8eb47e6 100644 --- a/UserRegister/package.json +++ b/UserRegister/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/user-register", "version": "0.0.1", - "description": "UserRegister", + "description": "用户注册是使用,用于填写基本的账号信息。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/userregister" diff --git a/UserRegisterResult/package.json b/UserRegisterResult/package.json index beedf2f9..83c4a5bb 100644 --- a/UserRegisterResult/package.json +++ b/UserRegisterResult/package.json @@ -1,7 +1,7 @@ { "name": "@umi-block/user-register-result", "version": "0.0.1", - "description": "UserRegisterResult", + "description": "用于展示注册的结果。", "repository": { "type": "git", "url": "https://github.com/umijs/umi-blocks/ant-design-pro/userregisterresult" diff --git a/blockList.json b/blockList.json new file mode 100644 index 00000000..fe7d116d --- /dev/null +++ b/blockList.json @@ -0,0 +1,510 @@ +[ + { + "title": "AccountCenter", + "value": "AccountCenter", + "key": "AccountCenter", + "description": "个人中心一般用于暂时用户的基本信息,已经相关的信息展示。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/AccountCenter", + "type": "block", + "path": "AccountCenter", + "isPage": true, + "defaultPath": "/AccountCenter", + "img": "https://github.com/ant-design/pro-blocks/raw/master/AccountCenter/snapshot.png", + "tags": [ + "账号", + "个人中心" + ], + "name": "AccountCenter", + "previewUrl": "https://preview.pro.ant.design/account/center" + }, + { + "title": "AccountSettings", + "value": "AccountSettings", + "key": "AccountSettings", + "description": "通常是用于用户设置名称、头像、用途、私密性等信息。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/AccountSettings", + "type": "block", + "path": "AccountSettings", + "isPage": true, + "defaultPath": "/AccountSettings", + "img": "https://github.com/ant-design/pro-blocks/raw/master/AccountSettings/snapshot.png", + "tags": [ + "账号", + "设置" + ], + "name": "AccountSettings", + "previewUrl": "https://preview.pro.ant.design/account/settings" + }, + { + "title": "DashboardAnalysis", + "value": "DashboardAnalysis", + "key": "DashboardAnalysis", + "description": "将同一主题下的多种下钻维度呈现在页面中,让用户能够研究多组数据并发现趋势,用户可操作数据,调整数据范围满足更精准的分析需求。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/DashboardAnalysis", + "type": "block", + "path": "DashboardAnalysis", + "isPage": true, + "defaultPath": "/DashboardAnalysis", + "img": "https://github.com/ant-design/pro-blocks/raw/master/DashboardAnalysis/snapshot.png", + "tags": [ + "dashboard", + "分析" + ], + "name": "DashboardAnalysis", + "previewUrl": "https://preview.pro.ant.design/dashboard/analysis" + }, + { + "title": "DashboardMonitor", + "value": "DashboardMonitor", + "key": "DashboardMonitor", + "description": "常用于数据报表细节信息的展示,根据业务诉求可配置文本、列表、可视化图表等。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/DashboardMonitor", + "type": "block", + "path": "DashboardMonitor", + "isPage": true, + "defaultPath": "/DashboardMonitor", + "img": "https://github.com/ant-design/pro-blocks/raw/master/DashboardMonitor/snapshot.png", + "tags": [ + "dashboard", + "监控" + ], + "name": "DashboardMonitor", + "previewUrl": "https://preview.pro.ant.design/dashboard/monitor" + }, + { + "title": "DashboardWorkplace", + "value": "DashboardWorkplace", + "key": "DashboardWorkplace", + "description": "工作台将应用中每个部分最关键的数据提取出来,在一个页面呈现,便于全局分析和决策。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/DashboardWorkplace", + "type": "block", + "path": "DashboardWorkplace", + "isPage": true, + "defaultPath": "/DashboardWorkplace", + "img": "https://github.com/ant-design/pro-blocks/raw/master/DashboardWorkplace/snapshot.png", + "tags": [ + "dashboard", + "工作台" + ], + "name": "DashboardWorkplace", + "previewUrl": "https://preview.pro.ant.design/dashboard/workplace" + }, + { + "title": "EditorFlow", + "value": "EditorFlow", + "key": "EditorFlow", + "description": "千言万语不如一张图,流程图是表示算法思路的最好方法。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/EditorFlow", + "type": "block", + "path": "EditorFlow", + "isPage": true, + "defaultPath": "/EditorFlow", + "img": "https://github.com/ant-design/pro-blocks/raw/master/EditorFlow/snapshot.png", + "tags": [ + "编辑器", + "流程图" + ], + "name": "EditorFlow", + "previewUrl": "https://preview.pro.ant.design/editor/flow" + }, + { + "title": "EditorKoni", + "value": "EditorKoni", + "key": "EditorKoni", + "description": "拓扑结构图可以清晰展示网络节点和通信介质构成的网络结构。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/EditorKoni", + "type": "block", + "path": "EditorKoni", + "isPage": true, + "defaultPath": "/EditorKoni", + "img": "https://github.com/ant-design/pro-blocks/raw/master/EditorKoni/snapshot.png", + "tags": [ + "编辑器", + "拓扑结构图" + ], + "name": "EditorKoni", + "previewUrl": "https://preview.pro.ant.design/editor/koni" + }, + { + "title": "EditorMind", + "value": "EditorMind", + "key": "EditorMind", + "description": "脑图是表达发散性思维的有效工具,它简单却又很有效,是一种非常实用展示工具。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/EditorMind", + "type": "block", + "path": "EditorMind", + "isPage": true, + "defaultPath": "/EditorMind", + "img": "https://github.com/ant-design/pro-blocks/raw/master/EditorMind/snapshot.png", + "tags": [ + "编辑器", + "脑图" + ], + "name": "EditorMind", + "previewUrl": "https://preview.pro.ant.design/editor/mind" + }, + { + "title": "Exception403", + "value": "Exception403", + "key": "Exception403", + "description": "403 Forbidden 代表客户端错误,指的是服务器端有能力处理该请求,但是拒绝授权访问,一般是权限异常导致。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/Exception403", + "type": "block", + "path": "Exception403", + "isPage": true, + "defaultPath": "/Exception403", + "img": "https://github.com/ant-design/pro-blocks/raw/master/Exception403/snapshot.png", + "tags": [ + "异常", + "403" + ], + "name": "Exception403", + "previewUrl": "https://preview.pro.ant.design/exception/403" + }, + { + "title": "Exception404", + "value": "Exception404", + "key": "Exception404", + "description": "404 Not Found 代表请求失败,请求所希望得到的资源未被在服务器上发现", + "url": "https://github.com/ant-design/pro-blocks/tree/master/Exception404", + "type": "block", + "path": "Exception404", + "isPage": true, + "defaultPath": "/Exception404", + "img": "https://github.com/ant-design/pro-blocks/raw/master/Exception404/snapshot.png", + "tags": [ + "异常", + "404" + ], + "name": "Exception404", + "previewUrl": "https://preview.pro.ant.design/exception/404" + }, + { + "title": "Exception500", + "value": "Exception500", + "key": "Exception500", + "description": "500 Internal Server Error,是表示服务器端错误的响应状态码。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/Exception500", + "type": "block", + "path": "Exception500", + "isPage": true, + "defaultPath": "/Exception500", + "img": "https://github.com/ant-design/pro-blocks/raw/master/Exception500/snapshot.png", + "tags": [ + "异常", + "500" + ], + "name": "Exception500", + "previewUrl": "https://preview.pro.ant.design/exception/500" + }, + { + "title": "FormAdvancedForm", + "value": "FormAdvancedForm", + "key": "FormAdvancedForm", + "description": "高级表单常适用于一次性输入和提交大批量数据的场景。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/FormAdvancedForm", + "type": "block", + "path": "FormAdvancedForm", + "isPage": true, + "defaultPath": "/FormAdvancedForm", + "img": "https://github.com/ant-design/pro-blocks/raw/master/FormAdvancedForm/snapshot.png", + "tags": [ + "表单", + "高级" + ], + "name": "FormAdvancedForm", + "previewUrl": "https://preview.pro.ant.design/form/advanced/form" + }, + { + "title": "FormBasicForm", + "value": "FormBasicForm", + "key": "FormBasicForm", + "description": "表单页用于向用户收集或验证信息,基础表单常用于数据项较少的表单场景。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/FormBasicForm", + "type": "block", + "path": "FormBasicForm", + "isPage": true, + "defaultPath": "/FormBasicForm", + "img": "https://github.com/ant-design/pro-blocks/raw/master/FormBasicForm/snapshot.png", + "tags": [ + "表单", + "基本" + ], + "name": "FormBasicForm", + "previewUrl": "https://preview.pro.ant.design/form/basic/form" + }, + { + "title": "FormStepForm", + "value": "FormStepForm", + "key": "FormStepForm", + "description": "分布表单使用与将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成的场景。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/FormStepForm", + "type": "block", + "path": "FormStepForm", + "isPage": true, + "defaultPath": "/FormStepForm", + "img": "https://github.com/ant-design/pro-blocks/raw/master/FormStepForm/snapshot.png", + "tags": [ + "表单", + "步骤" + ], + "name": "FormStepForm", + "previewUrl": "https://preview.pro.ant.design/form/step/form" + }, + { + "title": "ListBasicList", + "value": "ListBasicList", + "key": "ListBasicList", + "description": "用于陈列一类事务性主题,用户常常将这个页面当做开始事务的入口,主要以浏览方式寻找条目。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ListBasicList", + "type": "block", + "path": "ListBasicList", + "isPage": true, + "defaultPath": "/ListBasicList", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ListBasicList/snapshot.png", + "tags": [ + "列表", + "基本" + ], + "name": "ListBasicList", + "previewUrl": "https://preview.pro.ant.design/list/basic/list" + }, + { + "title": "ListCardList", + "value": "ListCardList", + "key": "ListCardList", + "description": "卡片组成的列表,一般用于展示有图的列表,更加美观。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ListCardList", + "type": "block", + "path": "ListCardList", + "isPage": true, + "defaultPath": "/ListCardList", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ListCardList/snapshot.png", + "tags": [ + "列表", + "卡片" + ], + "name": "ListCardList", + "previewUrl": "https://preview.pro.ant.design/list/card/list" + }, + { + "title": "ListSearch", + "value": "ListSearch", + "key": "ListSearch", + "description": "一个基本多标签页面,用于展示搜索列表。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ListSearch", + "type": "block", + "path": "ListSearch", + "isPage": true, + "defaultPath": "/ListSearch", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ListSearch/snapshot.png", + "tags": [ + "列表", + "搜索" + ], + "name": "ListSearch", + "previewUrl": "https://preview.pro.ant.design/list/search" + }, + { + "title": "ListSearchApplications", + "value": "ListSearchApplications", + "key": "ListSearchApplications", + "description": "常用于陈列某一主题下的大量条目,并提供丰富的数据筛选功能帮助用户匹配出需要的数据自己。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ListSearchApplications", + "type": "block", + "path": "ListSearchApplications", + "isPage": true, + "defaultPath": "/ListSearchApplications", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ListSearchApplications/snapshot.png", + "tags": [ + "列表", + "搜索", + "应用" + ], + "name": "ListSearchApplications", + "previewUrl": "https://preview.pro.ant.design/list/search/applications" + }, + { + "title": "ListSearchArticles", + "value": "ListSearchArticles", + "key": "ListSearchArticles", + "description": "常用于陈列某一主题下的大量条目,并提供丰富的数据筛选功能帮助用户匹配出需要的数据自己。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ListSearchArticles", + "type": "block", + "path": "ListSearchArticles", + "isPage": true, + "defaultPath": "/ListSearchArticles", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ListSearchArticles/snapshot.png", + "tags": [ + "列表", + "搜索", + "文章" + ], + "name": "ListSearchArticles", + "previewUrl": "https://preview.pro.ant.design/list/search/articles" + }, + { + "title": "ListSearchProjects", + "value": "ListSearchProjects", + "key": "ListSearchProjects", + "description": "常用于陈列某一主题下的大量条目,并提供丰富的数据筛选功能帮助用户匹配出需要的数据自己。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ListSearchProjects", + "type": "block", + "path": "ListSearchProjects", + "isPage": true, + "defaultPath": "/ListSearchProjects", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ListSearchProjects/snapshot.png", + "tags": [ + "列表", + "搜索", + "项目" + ], + "name": "ListSearchProjects", + "previewUrl": "https://preview.pro.ant.design/list/search/projects" + }, + { + "title": "ListTableList", + "value": "ListTableList", + "key": "ListTableList", + "description": "一个标准的表格增删改查页面,可以派生出百分之八十的后台页面。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ListTableList", + "type": "block", + "path": "ListTableList", + "isPage": true, + "defaultPath": "/ListTableList", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ListTableList/snapshot.png", + "tags": [ + "列表", + "表格" + ], + "name": "ListTableList", + "previewUrl": "https://preview.pro.ant.design/list/table/list" + }, + { + "title": "ProfileAdvanced", + "value": "ProfileAdvanced", + "key": "ProfileAdvanced", + "description": "一个复杂的详情页,可以展示一个对象的基本信息和其相关的新息和操作。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ProfileAdvanced", + "type": "block", + "path": "ProfileAdvanced", + "isPage": true, + "defaultPath": "/ProfileAdvanced", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ProfileAdvanced/snapshot.png", + "tags": [ + "详情", + "高级" + ], + "name": "ProfileAdvanced", + "previewUrl": "https://preview.pro.ant.design/profile/advanced" + }, + { + "title": "ProfileBasic", + "value": "ProfileBasic", + "key": "ProfileBasic", + "description": "详情页可以向用户展示一个对象完整的描述信息,并且可以对一个对象进行编辑操作。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ProfileBasic", + "type": "block", + "path": "ProfileBasic", + "isPage": true, + "defaultPath": "/ProfileBasic", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ProfileBasic/snapshot.png", + "tags": [ + "详情", + "基本" + ], + "name": "ProfileBasic", + "previewUrl": "https://preview.pro.ant.design/profile/basic" + }, + { + "title": "ResultFail", + "value": "ResultFail", + "key": "ResultFail", + "description": "告知用户操作后所产生的失败结果,引导用户接下来的行动。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ResultFail", + "type": "block", + "path": "ResultFail", + "isPage": true, + "defaultPath": "/ResultFail", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ResultFail/snapshot.png", + "tags": [ + "结果", + "失败" + ], + "name": "ResultFail", + "previewUrl": "https://preview.pro.ant.design/result/fail" + }, + { + "title": "ResultSuccess", + "value": "ResultSuccess", + "key": "ResultSuccess", + "description": "告知用户操作后所产生的成功结果,引导用户接下来的行动。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/ResultSuccess", + "type": "block", + "path": "ResultSuccess", + "isPage": true, + "defaultPath": "/ResultSuccess", + "img": "https://github.com/ant-design/pro-blocks/raw/master/ResultSuccess/snapshot.png", + "tags": [ + "结果", + "成功" + ], + "name": "ResultSuccess", + "previewUrl": "https://preview.pro.ant.design/result/success" + }, + { + "title": "UserLogin", + "value": "UserLogin", + "key": "UserLogin", + "description": "用户登录界面,支持用户名密码和手机号登录。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/UserLogin", + "type": "block", + "path": "UserLogin", + "isPage": true, + "defaultPath": "/UserLogin", + "img": "https://github.com/ant-design/pro-blocks/raw/master/UserLogin/snapshot.png", + "tags": [ + "用户", + "登录" + ], + "name": "UserLogin", + "previewUrl": "https://preview.pro.ant.design/user/login" + }, + { + "title": "UserRegister", + "value": "UserRegister", + "key": "UserRegister", + "description": "用户注册是使用,用于填写基本的账号信息。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/UserRegister", + "type": "block", + "path": "UserRegister", + "isPage": true, + "defaultPath": "/UserRegister", + "img": "https://github.com/ant-design/pro-blocks/raw/master/UserRegister/snapshot.png", + "tags": [ + "用户", + "注册" + ], + "name": "UserRegister", + "previewUrl": "https://preview.pro.ant.design/user/register" + }, + { + "title": "UserRegisterResult", + "value": "UserRegisterResult", + "key": "UserRegisterResult", + "description": "用于展示注册的结果。", + "url": "https://github.com/ant-design/pro-blocks/tree/master/UserRegisterResult", + "type": "block", + "path": "UserRegisterResult", + "isPage": true, + "defaultPath": "/UserRegisterResult", + "img": "https://github.com/ant-design/pro-blocks/raw/master/UserRegisterResult/snapshot.png", + "tags": [ + "用户", + "注册", + "结果" + ], + "name": "UserRegisterResult", + "previewUrl": "https://preview.pro.ant.design/user/register/result" + } +] \ No newline at end of file diff --git a/package.json b/package.json index b085b87e..7b8c639c 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "scripts": { "format-imports": "import-sort --write '**/*.{js,jsx,ts,tsx}'", "lint": "npm run lint:js && npm run lint:style", - "lint-staged": "lint-staged", + "lint-staged": "lint-staged && node ./.script/genBlockConfig.js&& git add ./blockList.json", "lint-staged:js": "eslint --ext .js,.jsx,.ts,.tsx", "lint:fix": "eslint --fix --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./ && npm run lint:style", "lint:js": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./",