From ff612c5c11c63835858785e65ea3aed3216d5280 Mon Sep 17 00:00:00 2001 From: niko <644506165@qq.com> Date: Fri, 20 Oct 2017 03:22:08 -0500 Subject: [PATCH] design review (#22) --- mock/api.js | 10 ++--- src/components/AvatarList/index.js | 1 + src/components/AvatarList/index.less | 12 ++++++ src/components/Charts/Bar/index.js | 4 +- src/components/Charts/ChartCard/index.less | 5 ++- src/components/Charts/Gauge/index.js | 2 +- src/components/Charts/MiniArea/index.js | 3 +- src/components/Charts/MiniBar/index.js | 2 +- src/components/Charts/Pie/index.js | 9 ++++- src/components/Charts/Pie/index.less | 2 +- src/components/Charts/Radar/index.less | 1 + src/components/Charts/TimelineChart/index.js | 6 +-- src/components/Charts/Trend/index.less | 2 +- src/components/EditableLinkGroup/index.js | 2 +- src/components/EditableLinkGroup/index.less | 3 +- src/components/StandardTable/index.js | 2 +- src/routes/Dashboard/Analysis.js | 20 +++++----- src/routes/Dashboard/Analysis.less | 31 ++++++++++++++-- src/routes/Dashboard/Monitor.js | 10 ++--- src/routes/Dashboard/Monitor.less | 2 +- src/routes/Dashboard/Workplace.js | 14 +++---- src/routes/Dashboard/Workplace.less | 25 ++++++++----- src/routes/List/BasicList.js | 4 +- src/routes/List/BasicList.less | 39 +++++++++++++++++++- src/routes/List/CardList.less | 8 ++++ src/routes/List/CoverCardList.js | 4 +- src/routes/List/CoverCardList.less | 4 +- src/routes/List/FilterCardList.js | 2 +- src/routes/List/SearchList.js | 28 +++++++++----- src/routes/List/SearchList.less | 21 ++++++++++- src/routes/List/TableList.js | 4 +- src/routes/List/TableList.less | 12 ++++++ src/theme.js | 2 +- src/utils/utils.less | 6 ++- 34 files changed, 221 insertions(+), 81 deletions(-) diff --git a/mock/api.js b/mock/api.js index e53d1824..654530bf 100644 --- a/mock/api.js +++ b/mock/api.js @@ -18,10 +18,10 @@ export function fakeList(count) { 'https://gw.alipayobjects.com/zos/rmsportal/VcmdbCBcwPTGYgbYeMzX.png', // DesignLab ]; const covers = [ - 'https://gw.alipayobjects.com/zos/rmsportal/nQIAJyTLNeVJfUpTskWk.png', - 'https://gw.alipayobjects.com/zos/rmsportal/pnhtvpOTzypPvmHVrfKN.png', - 'https://gw.alipayobjects.com/zos/rmsportal/SVrKVZEFDnhDTNpkplZj.png', - 'https://gw.alipayobjects.com/zos/rmsportal/bUIOUkPTHgfGdDhgsAgE.png', + 'https://gw.alipayobjects.com/zos/rmsportal/HrxcVbrKnCJOZvtzSqjN.png', + 'https://gw.alipayobjects.com/zos/rmsportal/alaPpKWajEbIYEUvvVNf.png', + 'https://gw.alipayobjects.com/zos/rmsportal/RLwlKSYGSXGHuWSojyvp.png', + 'https://gw.alipayobjects.com/zos/rmsportal/gLaIAoVWTtLbBWZNYEMg.png', ]; const list = []; @@ -31,7 +31,7 @@ export function fakeList(count) { owner: '曲丽丽', title: titles[i % 8], avatar: avatars[i % 4], - cover: covers[i % 4], + cover: Math.floor(i / 4) % 2 === 0 ? covers[i % 4] : covers[3 - (i % 4)], status: ['active', 'exception', 'normal'][i % 3], percent: Math.ceil(Math.random() * 50) + 50, logo: ['https://gw.alipayobjects.com/zos/rmsportal/KoJjkdbuTFxzJmmjuDVR.png', 'https://gw.alipayobjects.com/zos/rmsportal/UxGORCvEXJEsxOfEKZiA.png'][i % 2], diff --git a/src/components/AvatarList/index.js b/src/components/AvatarList/index.js index 7ae18577..fcd0f020 100644 --- a/src/components/AvatarList/index.js +++ b/src/components/AvatarList/index.js @@ -22,6 +22,7 @@ const Item = ({ src, size, tips, onClick = (() => {}) }) => { const cls = classNames(styles.avatarItem, { [styles.avatarItemLarge]: size === 'large', [styles.avatarItemSmall]: size === 'small', + [styles.avatarItemMini]: size === 'mini', }); return ( diff --git a/src/components/AvatarList/index.less b/src/components/AvatarList/index.less index 531e673d..6330297e 100644 --- a/src/components/AvatarList/index.less +++ b/src/components/AvatarList/index.less @@ -27,3 +27,15 @@ width: @avatar-size-sm; height: @avatar-size-sm; } + +.avatarItemMini { + width: 20px; + height: 20px; + :global { + .ant-avatar { + width: 20px; + height: 20px; + line-height: 20px; + } + } +} diff --git a/src/components/Charts/Bar/index.js b/src/components/Charts/Bar/index.js index eaa57739..d6cb8e07 100644 --- a/src/components/Charts/Bar/index.js +++ b/src/components/Charts/Bar/index.js @@ -72,7 +72,9 @@ class Bar extends PureComponent { name: 'x', }, }); - chart.interval().position('x*y').color(color); + chart.interval().position('x*y').color(color).style({ + fillOpacity: 1, + }); chart.render(); this.chart = chart; diff --git a/src/components/Charts/ChartCard/index.less b/src/components/Charts/ChartCard/index.less index d204e63a..59d4eb5b 100644 --- a/src/components/Charts/ChartCard/index.less +++ b/src/components/Charts/ChartCard/index.less @@ -19,7 +19,7 @@ .total { .textOverflow(); color: @heading-color; - margin-top: 8px; + margin-top: 4px; font-size: 30px; line-height: 38px; height: 38px; @@ -37,7 +37,8 @@ .footer { border-top: 1px solid @border-color-split; padding-top: 8px; - margin-top: 11px; + margin-top: 20px; + margin-bottom: 10px; & > * { position: relative; } diff --git a/src/components/Charts/Gauge/index.js b/src/components/Charts/Gauge/index.js index c59cfee5..50de76e8 100644 --- a/src/components/Charts/Gauge/index.js +++ b/src/components/Charts/Gauge/index.js @@ -121,7 +121,7 @@ class Gauge extends PureComponent { height, animate: false, plotCfg: { - margin: [10, 0, 30, 0], + margin: [10, 10, 30, 10], }, }); diff --git a/src/components/Charts/MiniArea/index.js b/src/components/Charts/MiniArea/index.js index 7f67e1bf..bb8b5be0 100644 --- a/src/components/Charts/MiniArea/index.js +++ b/src/components/Charts/MiniArea/index.js @@ -85,7 +85,8 @@ class MiniArea extends PureComponent { view.source(data, dataConfig); - view.area().position('x*y').color(color).shape('smooth'); + view.area().position('x*y').color(color).shape('smooth') + .style({ fillOpacity: 1 }); chart.on('tooltipchange', (ev) => { const item = ev.items[0]; diff --git a/src/components/Charts/MiniBar/index.js b/src/components/Charts/MiniBar/index.js index 7153cf3c..023aff08 100644 --- a/src/components/Charts/MiniBar/index.js +++ b/src/components/Charts/MiniBar/index.js @@ -25,7 +25,7 @@ class MiniBar extends PureComponent { } renderChart(data) { - const { height = 0, fit = true, color = '#33ABFB' } = this.props; + const { height = 0, fit = true, color = '#1890FF' } = this.props; if (!data || (data && data.length < 1)) { return; diff --git a/src/components/Charts/Pie/index.js b/src/components/Charts/Pie/index.js index 5d068caa..ad180265 100644 --- a/src/components/Charts/Pie/index.js +++ b/src/components/Charts/Pie/index.js @@ -59,8 +59,11 @@ class Pie extends Component { margin, percent, color, inner = 0.75, animate = true, + colors, } = this.props; + const defaultColors = colors || ['#8543E0', '#F04864', '#FACC14', '#1890FF', '#13C2C2', '#2FC25B']; + let selected = this.props.selected || true; let tooltip = this.props.tooltips || true; @@ -146,7 +149,11 @@ class Pie extends Component { inner, }); - chart.intervalStack().position(Stat.summary.percent('y')).color('x', formatColor).selected(selected); + if (percent) { + chart.intervalStack().position(Stat.summary.percent('y')).color('x', formatColor).selected(selected); + } else { + chart.intervalStack().position(Stat.summary.percent('y')).color('x', defaultColors).selected(selected); + } chart.render(); this.chart = chart; diff --git a/src/components/Charts/Pie/index.less b/src/components/Charts/Pie/index.less index 37392d19..bbfcc56d 100644 --- a/src/components/Charts/Pie/index.less +++ b/src/components/Charts/Pie/index.less @@ -62,7 +62,7 @@ & > p { color: @heading-color; display: block; - font-size: 24px; + font-size: 30px; height: 32px; line-height: 32px; } diff --git a/src/components/Charts/Radar/index.less b/src/components/Charts/Radar/index.less index 5e334680..1978111f 100644 --- a/src/components/Charts/Radar/index.less +++ b/src/components/Charts/Radar/index.less @@ -12,6 +12,7 @@ } h6 { color: @heading-color; + padding-left: 16px; font-size: 24px; line-height: 32px; margin-top: 2px; diff --git a/src/components/Charts/TimelineChart/index.js b/src/components/Charts/TimelineChart/index.js index 3e319aeb..39240123 100644 --- a/src/components/Charts/TimelineChart/index.js +++ b/src/components/Charts/TimelineChart/index.js @@ -30,7 +30,7 @@ class TimelineChart extends Component { } renderChart(data) { - const { height = 400, margin = [60, 40, 40, 40], titleMap } = this.props; + const { height = 400, margin = [60, 20, 40, 40], titleMap } = this.props; if (!data || (data && data.length < 1)) { return; @@ -81,8 +81,8 @@ class TimelineChart extends Component { }, }); - chart.line().position('x*y1').color('#4FAAEB'); - chart.line().position('x*y2').color('#9AD681'); + chart.line().position('x*y1').color('#1890FF'); + chart.line().position('x*y2').color('#2FC25B'); this.chart = chart; diff --git a/src/components/Charts/Trend/index.less b/src/components/Charts/Trend/index.less index d383fa53..8f11e046 100644 --- a/src/components/Charts/Trend/index.less +++ b/src/components/Charts/Trend/index.less @@ -23,7 +23,7 @@ display: none; } .title { - margin-right: 4px; + margin-right: 8px; } .value { color: @text-color; diff --git a/src/components/EditableLinkGroup/index.js b/src/components/EditableLinkGroup/index.js index 68c0c42f..c1876ab5 100644 --- a/src/components/EditableLinkGroup/index.js +++ b/src/components/EditableLinkGroup/index.js @@ -30,7 +30,7 @@ class EditableLinkGroup extends PureComponent { } { } diff --git a/src/components/EditableLinkGroup/index.less b/src/components/EditableLinkGroup/index.less index 16a3e18a..0d86f264 100644 --- a/src/components/EditableLinkGroup/index.less +++ b/src/components/EditableLinkGroup/index.less @@ -16,12 +16,13 @@ & > button { border-color: @primary-color; color: @primary-color; + padding-left: 12px; + padding-right: 12px; i { position: relative; top: -1px; } span { - margin-left: 0 !important; position: relative; top: -1px; } diff --git a/src/components/StandardTable/index.js b/src/components/StandardTable/index.js index 80979b75..f117da23 100644 --- a/src/components/StandardTable/index.js +++ b/src/components/StandardTable/index.js @@ -130,7 +130,7 @@ class StandardTable extends PureComponent {
已选择 {selectedRowKeys.length} 项 服务调用总计 {totalCallNo} 万 - 清空 + 清空
)} type="info" diff --git a/src/routes/Dashboard/Analysis.js b/src/routes/Dashboard/Analysis.js index 4a9dca74..553e1225 100644 --- a/src/routes/Dashboard/Analysis.js +++ b/src/routes/Dashboard/Analysis.js @@ -148,7 +148,7 @@ export default class Analysis extends Component { const activeKey = currentTabKey || (offlineData[0] && offlineData[0].name); const CustomTab = ({ data, currentTabKey: currentKey }) => ( -早安,曲丽丽,祝你开心每一天
+早安,曲丽丽,祝你开心每一天!
交互专家 | 蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED
项目数
56
团队内排名
8 / 24
项目访问
2,223
- {item.user.name} 在 xx 新建了项目 xxxx + {item.user.name} 在 xx 新建了项目 xxxx
} description={moment(item.updatedAt).fromNow()} diff --git a/src/routes/Dashboard/Workplace.less b/src/routes/Dashboard/Workplace.less index 467242f4..b9101ede 100644 --- a/src/routes/Dashboard/Workplace.less +++ b/src/routes/Dashboard/Workplace.less @@ -13,18 +13,19 @@ .pageHeaderContent { display: flex; .avatar { - flex: 0 1 80px; + flex: 0 1 72px; + margin-bottom: 12px; & > span { - border-radius: 80px; + border-radius: 72px; display: block; - width: 80px; - height: 80px; + width: 72px; + height: 72px; } } .content { position: relative; top: 8px; - margin-left: 32px; + margin-left: 24px; flex: 1 1 auto; color: @text-color-secondary; .contentTitle { @@ -38,18 +39,20 @@ .pageHeaderExtra { .clearfix(); + float: right; + margin-right: 8px; & > div { - padding: 0 24px; + padding: 0 32px; position: relative; float: left; & > p:first-child { color: @text-color-secondary; font-size: @font-size-base; line-height: 22px; - margin-bottom: 2px; + margin-bottom: 4px; } & > p { - color: @text-color; + color: @heading-color; font-size: 30px; line-height: 38px; & > span { @@ -108,11 +111,11 @@ :global { .ant-card-meta-description { color: @text-color-secondary; - font-size: 12px; - min-height: 36px; + min-height: 42px; } } .cardTitle { + font-size: 14px; :global { .ant-avatar { position: relative; @@ -178,6 +181,8 @@ margin-bottom: 0; } .pageHeaderExtra { + float: none; + margin-right: 0; & > div { padding: 0 16px; text-align: left; diff --git a/src/routes/List/BasicList.js b/src/routes/List/BasicList.js index 87c370c8..379b8269 100644 --- a/src/routes/List/BasicList.js +++ b/src/routes/List/BasicList.js @@ -110,16 +110,18 @@ export default class BasicList extends PureComponent {