docs: 📚️ delete design docs in demo (#1153)

* docs: 📚️ delete design docs in demo

* docs: 📚️ delete redundant variables
This commit is contained in:
vector
2021-07-08 18:24:02 +08:00
committed by GitHub
parent 661c19329b
commit 3a562697d5
2 changed files with 4 additions and 92 deletions

View File

@ -1,5 +1,5 @@
import React, { useState } from 'react'
import { Layout, Modal, Typography } from 'antd'
import React from 'react'
import { Layout } from 'antd'
import { useObservableState } from '@/common/hooks/useObservableState'
import { useExperimentGraph } from '@/pages/rx-models/experiment-graph'
import { GithubOutlined } from '@ant-design/icons'
@ -9,7 +9,6 @@ import { ExperimentTitle } from './experiment-title'
import css from './index.less'
const { Header } = Layout
const { Title, Paragraph, Text } = Typography
interface IProps {
experimentId: string
@ -18,7 +17,6 @@ interface IProps {
export const GuideHeader: React.FC<IProps> = (props) => {
const expGraph = useExperimentGraph(props.experimentId)
const [activeExperiment] = useObservableState(expGraph.experiment$)
const [designShow, setDesignShow] = useState(true)
const openGithub = () => {
window.open(
@ -36,50 +34,9 @@ export const GuideHeader: React.FC<IProps> = (props) => {
</div>
<div className={css.headerRight}>
<div className={css.doc}>
<span
style={{ marginRight: 16, cursor: 'pointer' }}
onClick={() => setDesignShow(true)}
>
</span>
<GithubOutlined onClick={openGithub} />
</div>
</div>
<Modal
width={540}
visible={designShow}
footer={null}
onCancel={() => setDesignShow(false)}
>
<Typography>
<Title level={3}>DAG图</Title>
<Paragraph>
DAG Directed Acyclic Graph
线
</Paragraph>
<Title level={5}>使</Title>
<Paragraph>DAG </Paragraph>
<Paragraph>
<ul>
<li>
<Text strong></Text> DAG
</li>
<li>
<Text strong></Text>
</li>
<li>
<Text strong></Text>
</li>
</ul>
</Paragraph>
<Paragraph style={{ textAlign: 'right' }}>
<Text></Text>
</Paragraph>
</Typography>
</Modal>
</Header>
</>
)

View File

@ -1,12 +1,11 @@
import React, { useState } from 'react';
import { Modal, Typography, Popover } from 'antd';
import React from 'react';
import { Popover } from 'antd';
import {
CompressOutlined,
OneToOneOutlined,
ZoomInOutlined,
ZoomOutOutlined,
GithubOutlined,
AntDesignOutlined,
} from '@ant-design/icons';
import classNames from 'classnames';
import styles from './index.less';
@ -19,11 +18,8 @@ interface Props {
onRealContent: () => void;
}
const { Title, Paragraph, Text } = Typography;
const GraphToolbar: React.FC<Props> = (props) => {
const { className, onZoomIn, onZoomOut, onFitContent, onRealContent } = props;
const [designShow, setDesignShow] = useState(true);
const onViewSource = () => {
window.open(
@ -79,47 +75,6 @@ const GraphToolbar: React.FC<Props> = (props) => {
<GithubOutlined />
</li>
</Popover>
<Popover
overlayClassName={styles.popover}
content="设计指南"
placement="left"
>
<li onClick={() => setDesignShow(true)} className={styles.item}>
<AntDesignOutlined />
</li>
</Popover>
<Modal
visible={designShow}
footer={null}
onCancel={() => setDesignShow(false)}
>
<Typography>
<Title level={3}>ER </Title>
<Paragraph>
ER模型
使
</Paragraph>
<Title level={5}>使</Title>
<Paragraph>
使
</Paragraph>
<Paragraph>
<ul>
<li>
<Text strong></Text>
</li>
<li>
<Text strong></Text>
使
</li>
</ul>
</Paragraph>
<Paragraph style={{ textAlign: 'right' }}>
<Text></Text>
</Paragraph>
</Typography>
</Modal>
</ul>
);
};