|
@@ -1,10 +1,28 @@ |
|
|
import { Dropdown } from 'antd'; |
|
|
|
|
|
|
|
|
import { Dropdown, Button } from 'antd'; |
|
|
import React from 'react'; |
|
|
import React from 'react'; |
|
|
import classNames from 'classnames'; |
|
|
import classNames from 'classnames'; |
|
|
import styles from './index.less'; |
|
|
import styles from './index.less'; |
|
|
|
|
|
import { PlayCircleOutlined, FireOutlined } from '@ant-design/icons'; |
|
|
|
|
|
import { useHistory } from "umi" |
|
|
|
|
|
|
|
|
const HeaderDropdown = ({ overlayClassName: cls, ...restProps }) => ( |
|
|
|
|
|
<Dropdown overlayClassName={classNames(styles.container, cls)} {...restProps} /> |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
const HeaderDropdown = ({ overlayClassName: cls, ...restProps }) => { |
|
|
|
|
|
|
|
|
|
|
|
const history = useHistory(); |
|
|
|
|
|
|
|
|
|
|
|
const onQuickStart = () => { |
|
|
|
|
|
history.push('/quickStart'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const onQuickActivity = () => { |
|
|
|
|
|
history.push('/activity/activityStart'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return <div style={{ display: 'flex', alignItems: 'center' }}> |
|
|
|
|
|
<Button onClick={onQuickStart} type='primary' icon={<PlayCircleOutlined />}>快速开店</Button> |
|
|
|
|
|
<Button onClick={onQuickActivity} style={{ marginLeft: '10px' }} icon={<FireOutlined />}>创建活动</Button> |
|
|
|
|
|
<Dropdown overlayClassName={classNames(styles.container, cls)} {...restProps} /> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
export default HeaderDropdown; |
|
|
export default HeaderDropdown; |