File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/eedWN59yJ/Dropdown.svg
27
27
| overlay(v-slot) | 菜单 | [ Menu] ( /components/menu-cn ) | - | |
28
28
| overlayClassName | 下拉根元素的类名称 | string | - | |
29
29
| overlayStyle | 下拉根元素的样式 | object | - | |
30
- | placement | 菜单弹出位置: ` bottomLeft ` ` bottom ` ` bottomRight ` ` topLeft ` ` top ` ` topRight ` | String | ` bottomLeft ` | |
30
+ | placement | 菜单弹出位置 | ` bottomLeft ` \| ` bottom ` \| ` bottomRight ` \| ` topLeft ` \| ` top ` \| ` topRight ` | ` bottomLeft ` | |
31
31
| trigger | 触发下拉的行为, 移动端不支持 hover | Array< ; ` click ` \| ` hover ` \| ` contextmenu ` > | ` ['hover'] ` | |
32
32
| visible(v-model) | 菜单是否显示 | boolean | - | |
33
33
@@ -51,7 +51,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/eedWN59yJ/Dropdown.svg
51
51
| icon | 右侧的 icon | VNode \| slot | - | 1.5.0 |
52
52
| loading | 设置按钮载入状态 | boolean \| { delay: number } | false | 3.0 |
53
53
| overlay(v-slot) | 菜单 | [ Menu] ( /components/menu-cn/ ) | - | |
54
- | placement | 菜单弹出位置: ` bottomLeft ` ` bottom ` ` bottomRight ` ` topLeft ` ` top ` ` topRight ` | String | ` bottomLeft ` | |
54
+ | placement | 菜单弹出位置 | ` bottomLeft ` \| ` bottom ` \| ` bottomRight ` \| ` topLeft ` \| ` top ` \| ` topRight ` | ` bottomLeft ` | |
55
55
| size | 按钮大小,和 [ Button] ( /components/button-cn/ ) 一致 | string | 'default' | |
56
56
| trigger | 触发下拉的行为 | Array< ; ` click ` \| ` hover ` \| ` contextmenu ` > | ` ['hover'] ` | |
57
57
| type | 按钮类型,和 [ Button] ( /components/button-cn/ ) 一致 | string | 'default' | |
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import PropTypes from '../_util/vue-types';
4
4
import buttonTypes from '../button/buttonTypes' ;
5
5
import type { MouseEventHandler } from '../_util/EventInterface' ;
6
6
7
- type Align = {
7
+ export type Align = {
8
8
points ?: [ string , string ] ;
9
9
offset ?: [ number , number ] ;
10
10
targetOffset ?: [ number , number ] ;
@@ -17,6 +17,8 @@ type Align = {
17
17
useCssTransform ?: boolean ;
18
18
} ;
19
19
20
+ export type Trigger = 'click' | 'hover' | 'contextmenu' ;
21
+
20
22
export type DropdownArrowOptions = {
21
23
pointAtCenter ?: boolean ;
22
24
} ;
@@ -26,9 +28,7 @@ const dropdownProps = () => ({
26
28
default : undefined ,
27
29
} ,
28
30
trigger : {
29
- type : [ Array , String ] as PropType <
30
- ( 'click' | 'hover' | 'contextmenu' ) [ ] | 'click' | 'hover' | 'contextmenu'
31
- > ,
31
+ type : [ Array , String ] as PropType < Trigger [ ] | Trigger > ,
32
32
} ,
33
33
overlay : PropTypes . any ,
34
34
visible : { type : Boolean , default : undefined } ,
You can’t perform that action at this time.
0 commit comments