Commit 856990a8 authored by jim's avatar jim

edit setting title

parent 85ca3167
......@@ -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 => {
......
......@@ -41,13 +41,13 @@ class SettingDarwer extends PureComponent {
onSelect={value => this.changeSetting('grid', value)}
style={{ width: 80 }}
>
<Select.Option value="Wide">Wide</Select.Option>
<Select.Option value="Fluid">Fluid</Select.Option>
<Select.Option value="Wide">定宽</Select.Option>
<Select.Option value="Fluid">流式</Select.Option>
</Select>,
],
},
{
title: 'Fixed Header',
title: '固定 Header',
action: [
<Switch
size="small"
......@@ -58,6 +58,7 @@ class SettingDarwer extends PureComponent {
},
{
title: '下滑时隐藏 Header',
hide: fixedHeader,
action: [
<Switch
size="small"
......@@ -67,7 +68,7 @@ class SettingDarwer extends PureComponent {
],
},
{
title: 'Fix Siderbar',
title: '固定 Siderbar',
action: [
<Switch
size="small"
......@@ -76,7 +77,9 @@ class SettingDarwer extends PureComponent {
/>,
],
},
];
].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';
......
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