diff --git a/.script/genBlockConfig.js b/.script/genBlockConfig.js index 075763ee..38295146 100644 --- a/.script/genBlockConfig.js +++ b/.script/genBlockConfig.js @@ -1,6 +1,56 @@ const fs = require('fs'); const { join } = require('path'); const gitUrl = 'https://github.com/ant-design/pro-blocks'; + +const menuData = { + home: '首页', + login: '登录', + register: '注册', + 'register/result': '注册结果', + dashboard: 'Dashboard', + 'dashboard/analysis': '分析页', + 'dashboard/monitor': '监控页', + 'dashboard/workplace': '工作台', + 'exception/403': '403', + 'exception/404': '404', + 'exception/500': '500', + form: '表单页', + 'user/login': '登录页', + 'user/register': '注册页', + 'user/register/result': '注册结果页', + 'form/basic/form': '基础表单', + 'form/step/form': '分步表单', + 'form/advanced/form': '高级表单', + list: '列表页', + 'list/table/list': '查询表格', + 'list/basic/list': '标准列表', + 'list/card/list': '卡片列表', + 'list/search': '搜索列表', + 'list/search/articles': '搜索列表(文章)', + 'list/search/projects': '搜索列表(项目)', + 'list/search/applications': '搜索列表(应用)', + profile: '详情页', + 'profile/basic': '基础详情页', + 'profile/advanced': '高级详情页', + result: '结果页', + 'result/success': '成功页', + 'result/fail': '失败页', + exception: '异常页', + 'exception/not-permission': '403', + 'exception/not-find': '404', + 'exception/server-error': '500', + 'exception/trigger': '触发错误', + account: '个人页', + 'account/center': '个人中心', + 'account/settings': '个人设置', + 'account/trigger': '触发报错', + 'account/logout': '退出登录', + editor: '图形编辑器', + 'editor/flow': '流程编辑器', + 'editor/mind': '脑图编辑器', + 'editor/koni': '拓扑编辑器', +}; + const tagsKey = { list: '列表', search: '搜索', @@ -69,7 +119,7 @@ const getFolderTreeData = filePath => { if (fs.existsSync(absPkgPath)) { const pkg = require(absPkgPath); return { - name: fileName, + name: menuData[genBlockName(fileName)], key: fileName, description: pkg.description, url: `${gitUrl}/tree/master/${fileName}`, diff --git a/umi-block.json b/umi-block.json index d725af15..b56d0c2d 100644 --- a/umi-block.json +++ b/umi-block.json @@ -1,7 +1,7 @@ { "list": [ { - "name": "AccountCenter", + "name": "个人中心", "key": "AccountCenter", "description": "个人中心一般用于暂时用户的基本信息,已经相关的信息展示。", "url": "https://github.com/ant-design/pro-blocks/tree/master/AccountCenter", @@ -13,7 +13,7 @@ "previewUrl": "https://preview.pro.ant.design/account/center" }, { - "name": "AccountSettings", + "name": "个人设置", "key": "AccountSettings", "description": "通常是用于用户设置名称、头像、用途、私密性等信息。", "url": "https://github.com/ant-design/pro-blocks/tree/master/AccountSettings", @@ -25,7 +25,7 @@ "previewUrl": "https://preview.pro.ant.design/account/settings" }, { - "name": "DashboardAnalysis", + "name": "分析页", "key": "DashboardAnalysis", "description": "将同一主题下的多种下钻维度呈现在页面中,让用户能够研究多组数据并发现趋势,用户可操作数据,调整数据范围满足更精准的分析需求。", "url": "https://github.com/ant-design/pro-blocks/tree/master/DashboardAnalysis", @@ -38,7 +38,7 @@ "previewUrl": "https://preview.pro.ant.design/dashboard/analysis" }, { - "name": "DashboardMonitor", + "name": "监控页", "key": "DashboardMonitor", "description": "常用于数据报表细节信息的展示,根据业务诉求可配置文本、列表、可视化图表等。", "url": "https://github.com/ant-design/pro-blocks/tree/master/DashboardMonitor", @@ -51,7 +51,7 @@ "previewUrl": "https://preview.pro.ant.design/dashboard/monitor" }, { - "name": "DashboardWorkplace", + "name": "工作台", "key": "DashboardWorkplace", "description": "工作台将应用中每个部分最关键的数据提取出来,在一个页面呈现,便于全局分析和决策。", "url": "https://github.com/ant-design/pro-blocks/tree/master/DashboardWorkplace", @@ -63,7 +63,7 @@ "previewUrl": "https://preview.pro.ant.design/dashboard/workplace" }, { - "name": "EditorFlow", + "name": "流程编辑器", "key": "EditorFlow", "description": "千言万语不如一张图,流程图是表示算法思路的最好方法。", "url": "https://github.com/ant-design/pro-blocks/tree/master/EditorFlow", @@ -75,7 +75,7 @@ "previewUrl": "https://preview.pro.ant.design/editor/flow" }, { - "name": "EditorKoni", + "name": "拓扑编辑器", "key": "EditorKoni", "description": "拓扑结构图可以清晰展示网络节点和通信介质构成的网络结构。", "url": "https://github.com/ant-design/pro-blocks/tree/master/EditorKoni", @@ -87,7 +87,7 @@ "previewUrl": "https://preview.pro.ant.design/editor/koni" }, { - "name": "EditorMind", + "name": "脑图编辑器", "key": "EditorMind", "description": "脑图是表达发散性思维的有效工具,它简单却又很有效,是一种非常实用展示工具。", "url": "https://github.com/ant-design/pro-blocks/tree/master/EditorMind", @@ -99,7 +99,7 @@ "previewUrl": "https://preview.pro.ant.design/editor/mind" }, { - "name": "Exception403", + "name": "403", "key": "Exception403", "description": "403 Forbidden 代表客户端错误,指的是服务器端有能力处理该请求,但是拒绝授权访问,一般是权限异常导致。", "url": "https://github.com/ant-design/pro-blocks/tree/master/Exception403", @@ -111,7 +111,7 @@ "previewUrl": "https://preview.pro.ant.design/exception/403" }, { - "name": "Exception404", + "name": "404", "key": "Exception404", "description": "404 Not Found 代表请求失败,请求所希望得到的资源未被在服务器上发现", "url": "https://github.com/ant-design/pro-blocks/tree/master/Exception404", @@ -123,7 +123,7 @@ "previewUrl": "https://preview.pro.ant.design/exception/404" }, { - "name": "Exception500", + "name": "500", "key": "Exception500", "description": "500 Internal Server Error,是表示服务器端错误的响应状态码。", "url": "https://github.com/ant-design/pro-blocks/tree/master/Exception500", @@ -135,7 +135,7 @@ "previewUrl": "https://preview.pro.ant.design/exception/500" }, { - "name": "FormAdvancedForm", + "name": "高级表单", "key": "FormAdvancedForm", "description": "高级表单常适用于一次性输入和提交大批量数据的场景。", "url": "https://github.com/ant-design/pro-blocks/tree/master/FormAdvancedForm", @@ -148,7 +148,7 @@ "previewUrl": "https://preview.pro.ant.design/form/advanced/form" }, { - "name": "FormBasicForm", + "name": "基础表单", "key": "FormBasicForm", "description": "表单页用于向用户收集或验证信息,基础表单常用于数据项较少的表单场景。", "url": "https://github.com/ant-design/pro-blocks/tree/master/FormBasicForm", @@ -161,7 +161,7 @@ "previewUrl": "https://preview.pro.ant.design/form/basic/form" }, { - "name": "FormStepForm", + "name": "分步表单", "key": "FormStepForm", "description": "分布表单使用与将一个冗长或用户不熟悉的表单任务分成多个步骤,指导用户完成的场景。", "url": "https://github.com/ant-design/pro-blocks/tree/master/FormStepForm", @@ -174,7 +174,7 @@ "previewUrl": "https://preview.pro.ant.design/form/step/form" }, { - "name": "ListBasicList", + "name": "标准列表", "key": "ListBasicList", "description": "用于陈列一类事务性主题,用户常常将这个页面当做开始事务的入口,主要以浏览方式寻找条目。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ListBasicList", @@ -187,7 +187,7 @@ "previewUrl": "https://preview.pro.ant.design/list/basic/list" }, { - "name": "ListCardList", + "name": "卡片列表", "key": "ListCardList", "description": "卡片组成的列表,一般用于展示有图的列表,更加美观。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ListCardList", @@ -200,7 +200,7 @@ "previewUrl": "https://preview.pro.ant.design/list/card/list" }, { - "name": "ListSearch", + "name": "搜索列表", "key": "ListSearch", "description": "一个基本多标签页面,用于展示搜索列表。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ListSearch", @@ -213,7 +213,7 @@ "previewUrl": "https://preview.pro.ant.design/list/search" }, { - "name": "ListSearchApplications", + "name": "搜索列表(应用)", "key": "ListSearchApplications", "description": "常用于陈列某一主题下的大量条目,并提供丰富的数据筛选功能帮助用户匹配出需要的数据自己。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ListSearchApplications", @@ -226,7 +226,7 @@ "previewUrl": "https://preview.pro.ant.design/list/search/applications" }, { - "name": "ListSearchArticles", + "name": "搜索列表(文章)", "key": "ListSearchArticles", "description": "常用于陈列某一主题下的大量条目,并提供丰富的数据筛选功能帮助用户匹配出需要的数据自己。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ListSearchArticles", @@ -239,7 +239,7 @@ "previewUrl": "https://preview.pro.ant.design/list/search/articles" }, { - "name": "ListSearchProjects", + "name": "搜索列表(项目)", "key": "ListSearchProjects", "description": "常用于陈列某一主题下的大量条目,并提供丰富的数据筛选功能帮助用户匹配出需要的数据自己。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ListSearchProjects", @@ -252,7 +252,7 @@ "previewUrl": "https://preview.pro.ant.design/list/search/projects" }, { - "name": "ListTableList", + "name": "查询表格", "key": "ListTableList", "description": "一个标准的表格增删改查页面,可以派生出百分之八十的后台页面。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ListTableList", @@ -265,7 +265,7 @@ "previewUrl": "https://preview.pro.ant.design/list/table/list" }, { - "name": "ProfileAdvanced", + "name": "高级详情页", "key": "ProfileAdvanced", "description": "一个复杂的详情页,可以展示一个对象的基本信息和其相关的新息和操作。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ProfileAdvanced", @@ -278,7 +278,7 @@ "previewUrl": "https://preview.pro.ant.design/profile/advanced" }, { - "name": "ProfileBasic", + "name": "基础详情页", "key": "ProfileBasic", "description": "详情页可以向用户展示一个对象完整的描述信息,并且可以对一个对象进行编辑操作。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ProfileBasic", @@ -291,7 +291,7 @@ "previewUrl": "https://preview.pro.ant.design/profile/basic" }, { - "name": "ResultFail", + "name": "失败页", "key": "ResultFail", "description": "告知用户操作后所产生的失败结果,引导用户接下来的行动。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ResultFail", @@ -303,7 +303,7 @@ "previewUrl": "https://preview.pro.ant.design/result/fail" }, { - "name": "ResultSuccess", + "name": "成功页", "key": "ResultSuccess", "description": "告知用户操作后所产生的成功结果,引导用户接下来的行动。", "url": "https://github.com/ant-design/pro-blocks/tree/master/ResultSuccess", @@ -315,7 +315,7 @@ "previewUrl": "https://preview.pro.ant.design/result/success" }, { - "name": "UserLogin", + "name": "登录页", "key": "UserLogin", "description": "用户登录界面,支持用户名密码和手机号登录。", "url": "https://github.com/ant-design/pro-blocks/tree/master/UserLogin", @@ -328,7 +328,7 @@ "previewUrl": "https://preview.pro.ant.design/user/login" }, { - "name": "UserRegister", + "name": "注册页", "key": "UserRegister", "description": "用户注册是使用,用于填写基本的账号信息。", "url": "https://github.com/ant-design/pro-blocks/tree/master/UserRegister", @@ -341,7 +341,7 @@ "previewUrl": "https://preview.pro.ant.design/user/register" }, { - "name": "UserRegisterResult", + "name": "注册结果页", "key": "UserRegisterResult", "description": "用于展示注册的结果。", "url": "https://github.com/ant-design/pro-blocks/tree/master/UserRegisterResult",