Skip to content

Commit

Permalink
less tags
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Sep 24, 2019
1 parent 205da68 commit 87df495
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
18 changes: 9 additions & 9 deletions .script/genBlockConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ const gitUrl = 'https://github.com/ant-design/pro-blocks';
const tagsKey = {
list: '列表',
search: '搜索',
articles: '文章',
articles: 'remove',
table: '表格',
form: '表单',
step: '步骤',
basic: '基本',
card: '卡片',
applications: '应用',
projects: '项目',
applications: 'remove',
projects: 'remove',
profile: '详情',
advanced: '高级',
result: '结果',
fail: '失败',
fail: 'remove',
success: '成功',
user: '用户',
login: '登录',
register: '注册',
account: '账号',
account: 'remove',
center: '个人中心',
settings: '设置',
settings: '个人设置',
dashboard: 'dashboard',
analysis: '分析',
monitor: '监控',
Expand All @@ -48,9 +48,9 @@ const genBlockName = name =>
* @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,
);
Array.from(new Set(name.match(/[A-Z]?[a-z]+|[0-9]+/g).map(p => p.toLowerCase())))
.map(key => tagsKey[key] || key)
.filter(key => key !== 'remove');

/**
* 遍历文件地址
Expand Down
16 changes: 5 additions & 11 deletions blockList.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"defaultPath": "/AccountCenter",
"img": "https://github.com/ant-design/pro-blocks/raw/master/AccountCenter/snapshot.png",
"tags": [
"账号",
"个人中心"
],
"name": "AccountCenter",
Expand All @@ -29,8 +28,7 @@
"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"
Expand Down Expand Up @@ -318,8 +316,7 @@
"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"
Expand All @@ -337,8 +334,7 @@
"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"
Expand All @@ -356,8 +352,7 @@
"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"
Expand Down Expand Up @@ -428,8 +423,7 @@
"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"
Expand Down

0 comments on commit 87df495

Please sign in to comment.