h5-Dooring/src/pages/home/index.tsx
2020-09-25 21:23:36 +08:00

111 lines
3.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import React from 'react';
import { Tabs, message } from 'antd';
import { history } from 'umi';
import {
MobileOutlined,
ConsoleSqlOutlined,
GithubOutlined,
CodeOutlined,
IdcardOutlined,
} from '@ant-design/icons';
import styles from './index.less';
const { TabPane } = Tabs;
const Home = () => {
const handleGo = (type: string) => {
if (type === 'H5') {
history.push('/editor?tid=123456');
} else if (type === 'PC') {
message.error('该功能暂未开放, 敬请关注...');
} else {
history.push('/ide');
}
};
return (
<div className={styles.homeWrap}>
<div className={styles.leftArea}>
<Tabs defaultActiveKey="1">
<TabPane
tab={
<span>
<MobileOutlined />
H5
</span>
}
key="1"
>
...
</TabPane>
<TabPane
tab={
<span>
<ConsoleSqlOutlined />
</span>
}
key="2"
>
...
</TabPane>
<TabPane
tab={
<span>
<IdcardOutlined />
</span>
}
key="3"
>
...
</TabPane>
</Tabs>
</div>
<div className={styles.contentArea}>
<div className={styles.logoTip}>
<div className={styles.logo}>
<span className={styles.logoText} title="H5-Dooring可视化编辑器">
H5-Dooring
</span>
</div>
<p style={{ display: 'inline-block', width: '520px', fontSize: '16px', lineHeight: '2' }}>
H5-Dooring是一款功能强大H5可视化页面配置解决方案
便H5落地页最佳实践 react为主
nodejs开发
</p>
</div>
<div className={styles.operation}>
<div className={styles.card} onClick={() => handleGo('H5')}>
<MobileOutlined />
<div>H5页面</div>
</div>
<div className={styles.card} onClick={() => handleGo('online')}>
<CodeOutlined />
<div>线</div>
</div>
<div className={styles.card} onClick={() => handleGo('PC')}>
<ConsoleSqlOutlined />
<div></div>
</div>
</div>
<footer className={styles.footer}>
<div>
<a href="https://github.com/MrXujiang/h5-Dooring">
<GithubOutlined />
</a>
<p>
Welcome to H5-Dooring{' '}
<span role="img" aria-label="welcome">
👋
</span>
</p>
</div>
</footer>
</div>
</div>
);
};
export default Home;