新增或编辑左侧内容

dev_forge
tangjiang 5 years ago
parent c9efb57040
commit ebc175b655

@ -3,7 +3,7 @@
* @Author: tangjiang
* @Date: 2019-11-15 16:38:34
* @Last Modified by: tangjiang
* @Last Modified time: 2019-11-19 09:10:45
* @Last Modified time: 2019-11-19 11:34:19
*/
import './index.scss';
import React, { Component } from 'react';
@ -27,7 +27,7 @@ class NewOrEditTask extends Component {
</div>
<div className="split-pane-area">
<SplitPane split="vertical" minSize={200} maxSize={-200} defaultSize="50%">
<div>
<div className={'split-pane-left'}>
<LeftPane />
</div>
<SplitPane split="vertical" defaultSize="100%" allowResize={false}>

@ -1,12 +1,14 @@
import React, { PureComponent } from 'react';
import { Form } from 'antd';
import connect from 'react-redux';
class EditTab extends PureComponent {
componentDidMount () {}
render () {
return (
<h2>编辑页</h2>
<div className={'editor_area'}>
</div>
)
}
}

@ -1,3 +1,12 @@
/*
* @Description: 左侧编辑 / 评论 / 提交记录
* @Author: tangjiang
* @Date: 2019-11-19 11:35:30
* @Last Modified by: tangjiang
* @Last Modified time: 2019-11-19 11:36:10
*/
import './index.scss';
import React, { useState } from 'react';
import { Tabs } from 'antd';
import EditorTab from './editorTab';
@ -8,12 +17,12 @@ const { TabPane } = Tabs;
const LeftPane = () => {
const [defaultActiveKey, setDefaultActiveKey] = useState('2');
const [defaultActiveKey, setDefaultActiveKey] = useState('prev');
const tabArrs = [
{ title: '编辑', key: '1', content: EditorTab },
{ title: '预览', key: '2', content: PrevTab },
{ title: '提交记录', key: '3', content: CommitTab },
{ title: '编辑', key: 'editor', content: EditorTab },
{ title: '预览', key: 'prev', content: PrevTab },
{ title: '提交记录', key: 'commit', content: CommitTab },
];
const tabs = tabArrs.map((tab) => {

@ -0,0 +1,5 @@
.split-pane-left{
.ant-tabs-nav-wrap{
padding: 0 30px;
}
}
Loading…
Cancel
Save