Commit c34566a2 authored by TZW's avatar TZW

AvatarDropdown

parent 57dccb36
import React, { useCallback, useState, useMemo } from 'react'; import React, { useCallback, useState, useMemo } from 'react';
import { LogoutOutlined, LockOutlined } from '@ant-design/icons'; import { LogoutOutlined, LockOutlined } from '@ant-design/icons';
import { Menu, Spin, Form, Modal, message, Avatar } from 'antd'; import { Menu, Spin, Form, Modal, message, Avatar, Select } from 'antd';
import { history, useModel } from '@umijs/max'; import { history, useModel } from '@umijs/max';
import { stringify } from 'querystring'; import { stringify } from 'querystring';
import HeaderDropdown from '../HeaderDropdown'; import HeaderDropdown from '../HeaderDropdown';
...@@ -156,8 +156,19 @@ const AvatarDropdown = ({ menu }) => { ...@@ -156,8 +156,19 @@ const AvatarDropdown = ({ menu }) => {
</Menu.Item> </Menu.Item>
</Menu> </Menu>
); );
const handleChange = (value) => {
console.log(value);
};
return ( return (
<div> <div
style={{
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
}}
>
<Modal <Modal
title="修改密码" title="修改密码"
open={visible} open={visible}
...@@ -179,6 +190,21 @@ const AvatarDropdown = ({ menu }) => { ...@@ -179,6 +190,21 @@ const AvatarDropdown = ({ menu }) => {
submitting={loading || !visible} submitting={loading || !visible}
/> />
</Modal> </Modal>
<Select
style={{ width: 150, marginRight: 8 }}
defaultValue="a"
options={[
{
value: 'a',
label: 'EMS',
},
{
value: 'b',
label: '导航',
},
]}
onChange={handleChange}
/>
<HeaderDropdown overlay={menuHeaderDropdown}> <HeaderDropdown overlay={menuHeaderDropdown}>
<span className={`${styles.action} ${styles.account}`}> <span className={`${styles.action} ${styles.account}`}>
<Avatar style={{ backgroundColor: '#1890ff' }}> <Avatar style={{ backgroundColor: '#1890ff' }}>
......
...@@ -58,13 +58,14 @@ ol { ...@@ -58,13 +58,14 @@ ol {
width: 100%; width: 100%;
overflow-x: auto; overflow-x: auto;
&-thead > tr, &-thead>tr,
&-tbody > tr { &-tbody>tr {
> th,
> td { >th,
>td {
white-space: pre; white-space: pre;
> span { >span {
display: block; display: block;
} }
} }
...@@ -313,7 +314,7 @@ ol { ...@@ -313,7 +314,7 @@ ol {
} }
.lightblue { .lightblue {
> td:first-child { >td:first-child {
position: relative; position: relative;
&::before { &::before {
...@@ -335,14 +336,14 @@ ol { ...@@ -335,14 +336,14 @@ ol {
width: 100%; width: 100%;
padding-left: 0 !important; padding-left: 0 !important;
> span:first-child { >span:first-child {
flex: 1; flex: 1;
> span:first-child { >span:first-child {
display: none !important; display: none !important;
} }
> .ant-spin-nested-loading { >.ant-spin-nested-loading {
width: 100%; width: 100%;
} }
} }
...@@ -389,9 +390,11 @@ ol { ...@@ -389,9 +390,11 @@ ol {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.ant-pro-table { .ant-pro-table {
width: 100%; width: 100%;
} }
.ant-drawer-wrapper-body { .ant-drawer-wrapper-body {
.diycard { .diycard {
height: unset; height: unset;
...@@ -399,7 +402,7 @@ ol { ...@@ -399,7 +402,7 @@ ol {
} }
.runtime-keep-alive-layout { .runtime-keep-alive-layout {
> div { >div {
height: 100% !important; height: 100% !important;
} }
} }
...@@ -447,7 +450,7 @@ ol { ...@@ -447,7 +450,7 @@ ol {
min-height: 100% !important; min-height: 100% !important;
overflow: hidden !important; overflow: hidden !important;
> div { >div {
height: 100%; height: 100%;
min-height: calc(100vh - 96px); min-height: calc(100vh - 96px);
} }
...@@ -459,12 +462,12 @@ ol { ...@@ -459,12 +462,12 @@ ol {
// 横向滚动条 // 横向滚动条
.scrollHoriz { .scrollHoriz {
> div { >div {
display: flex !important; display: flex !important;
flex-wrap: nowrap !important; flex-wrap: nowrap !important;
align-items: center !important; align-items: center !important;
> div { >div {
flex-shrink: 0 !important; flex-shrink: 0 !important;
} }
} }
...@@ -494,7 +497,9 @@ ol { ...@@ -494,7 +497,9 @@ ol {
top: -162px; top: -162px;
left: 74px; left: 74px;
color: #1890ff; color: #1890ff;
} }
.ant-popover-buttons { .ant-popover-buttons {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -503,4 +508,4 @@ ol { ...@@ -503,4 +508,4 @@ ol {
.ant-input-number { .ant-input-number {
width: 100%; width: 100%;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment