Browse Source

快速建店、创建活动改变位置

tags/小炒逻辑变更前
yangwenhua 2 years ago
parent
commit
88f0213bdc
1 changed files with 22 additions and 4 deletions
  1. +22
    -4
      src/components/HeaderDropdown/index.jsx

+ 22
- 4
src/components/HeaderDropdown/index.jsx View File

@@ -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;

Loading…
Cancel
Save