From 856990a8d9700a8c17caa97224f6b164b71732d2 Mon Sep 17 00:00:00 2001 From: jim Date: Thu, 7 Jun 2018 10:51:48 +0800 Subject: [PATCH] edit setting title --- src/components/Charts/TimelineChart/index.js | 3 +-- src/components/SettingDarwer/index.js | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/components/Charts/TimelineChart/index.js b/src/components/Charts/TimelineChart/index.js index e7ab6b11..018464da 100644 --- a/src/components/Charts/TimelineChart/index.js +++ b/src/components/Charts/TimelineChart/index.js @@ -44,8 +44,7 @@ export default class TimelineChart extends React.Component { }); const dv = ds.createView(); - dv - .source(data) + dv.source(data) .transform({ type: 'filter', callback: obj => { diff --git a/src/components/SettingDarwer/index.js b/src/components/SettingDarwer/index.js index 386ee607..cf113471 100644 --- a/src/components/SettingDarwer/index.js +++ b/src/components/SettingDarwer/index.js @@ -41,13 +41,13 @@ class SettingDarwer extends PureComponent { onSelect={value => this.changeSetting('grid', value)} style={{ width: 80 }} > - Wide - Fluid + 定宽 + 流式 , ], }, { - title: 'Fixed Header', + title: '固定 Header', action: [ , ], }, - ]; + ].filter(item => { + return !item.hide; + }); }; changeSetting = (key, value) => { const nextState = { ...this.props.setting }; @@ -88,6 +91,11 @@ class SettingDarwer extends PureComponent { nextState.grid = 'Fluid'; } } + if (key === 'fixedHeader') { + if (value) { + nextState.autoHideHeader = false; + } + } if (key === 'colorWeak') { if (value === 'open') { document.body.className = 'colorWeak'; -- GitLab