diff --git a/packages/components/src/components/dropdown/style/index.less b/packages/components/src/components/dropdown/style/index.less
index 32f2d91675..bc3de619b9 100644
--- a/packages/components/src/components/dropdown/style/index.less
+++ b/packages/components/src/components/dropdown/style/index.less
@@ -17,7 +17,6 @@
&-content {
position: relative;
- padding: 16px 8px 12px;
background-color: @color-background-dropdown;
border-radius: 4px;
box-shadow: @shadow-dropdown;
diff --git a/packages/components/src/components/tooltip/Tooltip.tsx b/packages/components/src/components/tooltip/Tooltip.tsx
index 2c996c0e39..e8004d2a16 100644
--- a/packages/components/src/components/tooltip/Tooltip.tsx
+++ b/packages/components/src/components/tooltip/Tooltip.tsx
@@ -8,7 +8,7 @@ import Link from '../link';
import getPlacements from './placements';
import useControlledState from '../../utils/hooks/useControlledState';
-const Tooltip = (props: TooltipProps): React.ReactNode => {
+const Tooltip = (props: TooltipProps): JSX.Element => {
const {
title,
tooltipLink,
diff --git a/packages/website/src/components/functional/dropdown/demo/assistList.tsx b/packages/website/src/components/functional/dropdown/demo/assistList.tsx
new file mode 100644
index 0000000000..36764d5af7
--- /dev/null
+++ b/packages/website/src/components/functional/dropdown/demo/assistList.tsx
@@ -0,0 +1,15 @@
+import React from 'react';
+import { Button, Dropdown, List } from '@gio-design/components';
+
+const options = [
+ { value: 'a', label: '功能名称', description: '这里是辅助文字' },
+ { value: 'b', label: '功能名称', description: '这里是辅助文字', tooltip: 'test', disabled: true },
+ { value: 'c', label: '功能名称', description: '这里是辅助文字' },
+ { value: 'd', label: '功能名称', description: '这里是辅助文字', disabled: true },
+];
+
+export default () => (
+ }>
+
+
+);
diff --git a/packages/website/src/components/functional/dropdown/demo/base.tsx b/packages/website/src/components/functional/dropdown/demo/base.tsx
index cc012bc342..7245f106a0 100644
--- a/packages/website/src/components/functional/dropdown/demo/base.tsx
+++ b/packages/website/src/components/functional/dropdown/demo/base.tsx
@@ -3,7 +3,25 @@ import { Dropdown, Button } from '@gio-design/components';
import '@gio-design/components/es/components/dropdown/style/index.css';
export default () => (
- 11111}>
-
+
+ 内容区域
+
+ }
+ placement="bottomRight"
+ >
+
);
diff --git a/packages/website/src/components/functional/dropdown/demo/button.tsx b/packages/website/src/components/functional/dropdown/demo/button.tsx
new file mode 100644
index 0000000000..205bf1a89a
--- /dev/null
+++ b/packages/website/src/components/functional/dropdown/demo/button.tsx
@@ -0,0 +1,15 @@
+import React from 'react';
+import { Button, Dropdown, List } from '@gio-design/components';
+
+const options = [
+ { value: 'a', label: '功能名称' },
+ { value: 'b', label: '功能名称', tooltip: 'test', disabled: true },
+ { value: 'c', label: '功能名称' },
+ { value: 'd', label: '功能名称', disabled: true },
+];
+
+export default () => (
+ }>
+
+
+);
diff --git a/packages/website/src/components/functional/dropdown/demo/content.tsx b/packages/website/src/components/functional/dropdown/demo/content.tsx
new file mode 100644
index 0000000000..4e1a3a08e3
--- /dev/null
+++ b/packages/website/src/components/functional/dropdown/demo/content.tsx
@@ -0,0 +1,34 @@
+import React from 'react';
+import { Dropdown, Avatar, Link } from '@gio-design/components';
+import '@gio-design/components/es/components/dropdown/style/index.css';
+import image from '../../avatar/demo/Avatar.png';
+import './index.less';
+
+const renderAvatarContent = () => {
+ return (
+
+
+
T
+
TANGTANG
+
tangtang@growingio.com
+
+ 个人设置
+
+
+
+
版本信息
+
当前版本:V 2020.6.4
+
+
+
退出登录
+
+ );
+};
+
+export default () => {
+ return (
+
+ 1111
+
+ );
+};
diff --git a/packages/website/src/components/functional/dropdown/demo/filter.tsx b/packages/website/src/components/functional/dropdown/demo/filter.tsx
new file mode 100644
index 0000000000..41a2e1a09a
--- /dev/null
+++ b/packages/website/src/components/functional/dropdown/demo/filter.tsx
@@ -0,0 +1,68 @@
+/* eslint-disable react/jsx-wrap-multilines */
+import React, { useState } from 'react';
+import { Button, Dropdown, List, SearchBar } from '@gio-design/components';
+import { FilterOutlined } from '@gio-design/icons';
+import { difference, union } from 'lodash';
+
+const options = [
+ { value: 'a', label: '功能名称' },
+ { value: 'b', label: '功能名称' },
+ { value: 'c', label: '功能名称' },
+ { value: 'd', label: '功能名称' },
+ { value: 'e', label: '功能名称' },
+ { value: 'f', label: '功能名称' },
+ { value: 'g', label: '功能名称' },
+ { value: 'h', label: '功能名称' },
+];
+
+export default () => {
+ const [searchvalue, setSearchValue] = useState('');
+ const [value, setValue] = useState(['a', 'b']);
+ return (
+
+ {
+ setSearchValue(va);
+ }}
+ inputWrapStyle={{ width: 208, margin: '16px 16px 8px' }}
+ />
+ {
+ if (value.includes(o.value)) {
+ setValue(difference(value, o.value));
+ } else {
+ setValue(union(value, o.value));
+ }
+ }}
+ />
+
+
+
+
+ >
+ }
+ >
+ } />
+
+ );
+};
diff --git a/packages/website/src/components/functional/dropdown/demo/function.tsx b/packages/website/src/components/functional/dropdown/demo/function.tsx
new file mode 100644
index 0000000000..900adb3a08
--- /dev/null
+++ b/packages/website/src/components/functional/dropdown/demo/function.tsx
@@ -0,0 +1,43 @@
+/* eslint-disable react/jsx-wrap-multilines */
+import React, { useState } from 'react';
+import { Button, Dropdown, List, SearchBar } from '@gio-design/components';
+import { PlusCircleFilled } from '@gio-design/icons';
+
+const options = [
+ { value: 'a', label: '功能名称' },
+ { value: 'b', label: '功能名称' },
+ { value: 'c', label: '功能名称' },
+ { value: 'd', label: '功能名称' },
+ { value: 'e', label: '功能名称' },
+ { value: 'f', label: '功能名称' },
+ { value: 'g', label: '功能名称' },
+ { value: 'h', label: '功能名称' },
+];
+
+export default () => {
+ const [searchvalue, setSearchValue] = useState('');
+ return (
+
+ {
+ setSearchValue(va);
+ }}
+ inputWrapStyle={{ width: 288, margin: '16px 16px 8px' }}
+ />
+
+
+ } style={{ margin: '8px 16px' }}>
+ 清除
+
+
+ >
+ }
+ >
+
+
+ );
+};
diff --git a/packages/website/src/components/functional/dropdown/demo/icons.tsx b/packages/website/src/components/functional/dropdown/demo/icons.tsx
new file mode 100644
index 0000000000..68571e4993
--- /dev/null
+++ b/packages/website/src/components/functional/dropdown/demo/icons.tsx
@@ -0,0 +1,16 @@
+import React from 'react';
+import { Button, Dropdown, List } from '@gio-design/components';
+import { More } from '@gio-design/icons';
+
+const options = [
+ { value: 'a', label: '功能名称' },
+ { value: 'b', label: '功能名称', tooltip: 'test', disabled: true },
+ { value: 'c', label: '功能名称' },
+ { value: 'd', label: '功能名称', disabled: true },
+];
+
+export default () => (
+ }>
+ } />
+
+);
diff --git a/packages/website/src/components/functional/dropdown/demo/index.less b/packages/website/src/components/functional/dropdown/demo/index.less
new file mode 100644
index 0000000000..6c5995ae10
--- /dev/null
+++ b/packages/website/src/components/functional/dropdown/demo/index.less
@@ -0,0 +1,67 @@
+.avatar-content {
+ width: 280px;
+ height: 323px;
+ letter-spacing: 0;
+ border-radius: 6px;
+ box-shadow: 0 2px 14px 0 rgba(223, 226, 237, 0.8);
+ &-info {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding-top: 10px;
+ background-color: #f5f7fc;
+ &-name {
+ color: #313e75;
+ font-weight: 500;
+ font-size: 14px;
+ line-height: 22px;
+ }
+ &-email {
+ color: #a3adc8;
+ font-size: 12px;
+ line-height: 20px;
+ }
+ &-link {
+ margin: 8px 0;
+ color: #1248e9;
+ font-size: 14px;
+ line-height: 24px;
+ text-decoration: underline;
+ }
+ }
+ &-version {
+ height: 56px;
+ margin: 16px 8px 8px;
+ overflow: hidden;
+ border-radius: 4px;
+ &-title {
+ margin: 7px 0 0 16px;
+ color: #313e75;
+ font-size: 14px;
+ line-height: 22px;
+ }
+ &-content {
+ margin-left: 16px;
+ color: #a3adc8;
+ font-size: 12px;
+ line-height: 20px;
+ }
+ }
+ hr {
+ margin: 0 16px;
+ border-top: 1px solid #dcdfed;
+ }
+ &-logout {
+ height: 40px;
+ margin: 8px 8px 16px;
+ padding: 9px 16px;
+ color: #313e75;
+ font-size: 14px;
+ line-height: 22px;
+ border-radius: 4px;
+ cursor: pointer;
+ &:hover {
+ background-color: #f7f8fc;
+ }
+ }
+}
diff --git a/packages/website/src/components/functional/dropdown/demo/other.tsx b/packages/website/src/components/functional/dropdown/demo/other.tsx
deleted file mode 100644
index 20d3500ab6..0000000000
--- a/packages/website/src/components/functional/dropdown/demo/other.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import React from 'react';
-import { Dropdown, Button } from '@gio-design/components';
-import { More } from '@gio-design/icons';
-import '@gio-design/components/es/components/dropdown/style/index.css';
-
-export default () => (
- 11111}>
- } />
-
-);
diff --git a/packages/website/src/components/functional/dropdown/demo/placement.tsx b/packages/website/src/components/functional/dropdown/demo/placement.tsx
new file mode 100644
index 0000000000..92d0650a0a
--- /dev/null
+++ b/packages/website/src/components/functional/dropdown/demo/placement.tsx
@@ -0,0 +1,22 @@
+import React from 'react';
+import { Button, Dropdown, List } from '@gio-design/components';
+import { More } from '@gio-design/icons';
+
+const options = [
+ { value: 'a', label: '功能名称' },
+ { value: 'c', label: '功能名称' },
+];
+
+export default () => (
+ <>
+ } placement="bottomRight">
+ } style={{ marginLeft: '64px' }} />
+
+ } placement="bottom">
+ } style={{ margin: '0px 128px' }} />
+
+ } placement="bottomLeft">
+ } />
+
+ >
+);
diff --git a/packages/website/src/components/functional/dropdown/index.zh-CN.md b/packages/website/src/components/functional/dropdown/index.zh-CN.md
index 8463ea838d..dfcfa799e2 100644
--- a/packages/website/src/components/functional/dropdown/index.zh-CN.md
+++ b/packages/website/src/components/functional/dropdown/index.zh-CN.md
@@ -14,13 +14,35 @@ group:
向下弹出的列表。当页面上的操作命令过多时,用此组件可以收纳操作元素。点击或移入触点,会出现一个下拉菜单。可在列表中进行选择,并执行相应的命令。
-- 用于收罗一组命令操作。
-- Select 用于选择,而 Dropdown 是命令集合。
+[1] 用于收罗一组命令操作。
+[2] Select 用于选择,而 Dropdown 是命令集合。
+
+## 应用场景
+
+【在控件中使用】
+
+- Table - 「···」、「头像列表 - 看板」、「Tag 列表 - 埋点事件」、「筛选」
+- 导航 - 「头像」、「选择项目」
+- 搜索框 - 「最近搜索记录」
+
+【在页面中使用】
+
+- Button「···」触发;
+- Select 触发。
## 代码演示
-
-
+[1] 当页面上的操作命令过多时,常使用 Dropdown 收纳操作元素。
+[2] 点击触点,出现下拉菜单,在列表中选择相应的命令执行,点击相应命令后自动收起列表,点击区域为整条列表项,点击空白处列表收起。
+
+
+
+
+
+
+
+
+
## 参数说明