|
|
|
@ -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) => {
|
|
|
|
|