index.tsx 1.37 KB
Newer Older
陈帅's avatar
陈帅 committed
1 2
import React from 'react';
import { Row, Col } from 'antd';
陈帅's avatar
陈帅 committed
3
import GGEditor, { Flow } from 'gg-editor';
陈帅's avatar
陈帅 committed
4 5
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { formatMessage } from 'umi-plugin-react/locale';
陈帅's avatar
陈帅 committed
6 7 8 9 10 11 12 13 14
import EditorMinimap from './components/EditorMinimap';
import { FlowContextMenu } from './components/EditorContextMenu';
import { FlowToolbar } from './components/EditorToolbar';
import { FlowItemPanel } from './components/EditorItemPanel';
import { FlowDetailPanel } from './components/EditorDetailPanel';
import styles from './index.less';

GGEditor.setTrackable(false);

陈帅's avatar
陈帅 committed
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 43
export default () => (
  <PageHeaderWrapper
    content={formatMessage({
      id: 'BLOCK_NAME.description',
      defaultMessage: 'description',
    })}
  >
    <GGEditor className={styles.editor}>
      <Row type="flex" className={styles.editorHd}>
        <Col span={24}>
          <FlowToolbar />
        </Col>
      </Row>
      <Row type="flex" className={styles.editorBd}>
        <Col span={4} className={styles.editorSidebar}>
          <FlowItemPanel />
        </Col>
        <Col span={16} className={styles.editorContent}>
          <Flow className={styles.flow} />
        </Col>
        <Col span={4} className={styles.editorSidebar}>
          <FlowDetailPanel />
          <EditorMinimap />
        </Col>
      </Row>
      <FlowContextMenu />
    </GGEditor>
  </PageHeaderWrapper>
);