Commit 856990a8 authored by jim's avatar jim

edit setting title

parent 85ca3167
...@@ -44,8 +44,7 @@ export default class TimelineChart extends React.Component { ...@@ -44,8 +44,7 @@ export default class TimelineChart extends React.Component {
}); });
const dv = ds.createView(); const dv = ds.createView();
dv dv.source(data)
.source(data)
.transform({ .transform({
type: 'filter', type: 'filter',
callback: obj => { callback: obj => {
......
...@@ -41,13 +41,13 @@ class SettingDarwer extends PureComponent { ...@@ -41,13 +41,13 @@ class SettingDarwer extends PureComponent {
onSelect={value => this.changeSetting('grid', value)} onSelect={value => this.changeSetting('grid', value)}
style={{ width: 80 }} style={{ width: 80 }}
> >
<Select.Option value="Wide">Wide</Select.Option> <Select.Option value="Wide">定宽</Select.Option>
<Select.Option value="Fluid">Fluid</Select.Option> <Select.Option value="Fluid">流式</Select.Option>
</Select>, </Select>,
], ],
}, },
{ {
title: 'Fixed Header', title: '固定 Header',
action: [ action: [
<Switch <Switch
size="small" size="small"
...@@ -58,6 +58,7 @@ class SettingDarwer extends PureComponent { ...@@ -58,6 +58,7 @@ class SettingDarwer extends PureComponent {
}, },
{ {
title: '下滑时隐藏 Header', title: '下滑时隐藏 Header',
hide: fixedHeader,
action: [ action: [
<Switch <Switch
size="small" size="small"
...@@ -67,7 +68,7 @@ class SettingDarwer extends PureComponent { ...@@ -67,7 +68,7 @@ class SettingDarwer extends PureComponent {
], ],
}, },
{ {
title: 'Fix Siderbar', title: '固定 Siderbar',
action: [ action: [
<Switch <Switch
size="small" size="small"
...@@ -76,7 +77,9 @@ class SettingDarwer extends PureComponent { ...@@ -76,7 +77,9 @@ class SettingDarwer extends PureComponent {
/>, />,
], ],
}, },
]; ].filter(item => {
return !item.hide;
});
}; };
changeSetting = (key, value) => { changeSetting = (key, value) => {
const nextState = { ...this.props.setting }; const nextState = { ...this.props.setting };
...@@ -88,6 +91,11 @@ class SettingDarwer extends PureComponent { ...@@ -88,6 +91,11 @@ class SettingDarwer extends PureComponent {
nextState.grid = 'Fluid'; nextState.grid = 'Fluid';
} }
} }
if (key === 'fixedHeader') {
if (value) {
nextState.autoHideHeader = false;
}
}
if (key === 'colorWeak') { if (key === 'colorWeak') {
if (value === 'open') { if (value === 'open') {
document.body.className = 'colorWeak'; document.body.className = 'colorWeak';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment