index.js 1.39 KB
Newer Older
1 2 3 4 5 6 7 8 9
import React from 'react';
import { Row, Col } from 'antd';
import GGEditor, { Mind } from 'gg-editor';
import EditorMinimap from '../components/EditorMinimap';
import { MindContextMenu } from '../components/EditorContextMenu';
import { MindToolbar } from '../components/EditorToolbar';
import { MindDetailPanel } from '../components/EditorDetailPanel';
import data from '../mock/worldCup2018.json';
import styles from '../Flow/index.less';
10
import { FormattedMessage } from 'umi-plugin-react/locale';
11 12
import PageHeaderWrapper from '@/components/PageHeaderWrapper';

chen shuai's avatar
chen shuai committed
13 14
GGEditor.setTrackable(false);

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
const MindPage = () => {
  return (
    <PageHeaderWrapper
      title={<FormattedMessage id="app.editor.mind.title" />}
      content={<FormattedMessage id="app.editor.mind.description" />}
    >
      <GGEditor className={styles.editor}>
        <Row type="flex" className={styles.editorHd}>
          <Col span={24}>
            <MindToolbar />
          </Col>
        </Row>
        <Row type="flex" className={styles.editorBd}>
          <Col span={20} className={styles.editorContent}>
            <Mind data={data} className={styles.mind} />
          </Col>
          <Col span={4} className={styles.editorSidebar}>
            <MindDetailPanel />
            <EditorMinimap />
          </Col>
        </Row>
        <MindContextMenu />
      </GGEditor>
    </PageHeaderWrapper>
  );
};

export default MindPage;