index.tsx 1.42 KB
Newer Older
陈帅's avatar
陈帅 committed
1 2 3
import React from 'react';
import { Row, Col } from 'antd';
import GGEditor, { Koni } 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 { KoniContextMenu } from './components/EditorContextMenu';
import { KoniToolbar } from './components/EditorToolbar';
import { KoniItemPanel } from './components/EditorItemPanel';
import { KoniDetailPanel } from './components/EditorDetailPanel';
import styles from './index.less';

GGEditor.setTrackable(false);

陈帅's avatar
陈帅 committed
15
export default () => (
陈帅's avatar
陈帅 committed
16 17 18 19 20 21
    <PageHeaderWrapper
      content={formatMessage({
        id: 'BLOCK_NAME.description',
        defaultMessage: 'description',
      })}
    >
陈帅's avatar
陈帅 committed
22 23 24 25 26 27 28
      <GGEditor className={styles.editor}>
        <Row type="flex" className={styles.editorHd}>
          <Col span={24}>
            <KoniToolbar />
          </Col>
        </Row>
        <Row type="flex" className={styles.editorBd}>
陈帅's avatar
陈帅 committed
29
          <Col span={2} className={styles.editorSidebar}>
陈帅's avatar
陈帅 committed
30 31 32 33 34
            <KoniItemPanel />
          </Col>
          <Col span={16} className={styles.editorContent}>
            <Koni className={styles.koni} />
          </Col>
陈帅's avatar
陈帅 committed
35
          <Col span={6} className={styles.editorSidebar}>
陈帅's avatar
陈帅 committed
36 37 38 39 40 41 42 43
            <KoniDetailPanel />
            <EditorMinimap />
          </Col>
        </Row>
        <KoniContextMenu />
      </GGEditor>
    </PageHeaderWrapper>
  );