Skip to content

Commit cb6b6e9

Browse files
docs(DropdownMenu): update api docs (#803)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 7c08385 commit cb6b6e9

File tree

12 files changed

+195
-10
lines changed

12 files changed

+195
-10
lines changed

db/TDesign.db

0 Bytes
Binary file not shown.

packages/products/tdesign-miniprogram/packages/components/dropdown-menu/README.en-US.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,26 @@ name | type | default | description | required
4444
style | Object | - | CSS(Cascading Style Sheets) | N
4545
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
4646
disabled | Boolean | false | \- | N
47-
keys | Object | - | Typescript`KeysType`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
47+
keys | Object | - | Typescript: `KeysType`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/common/common.ts) | N
4848
label | String | - | \- | N
4949
multiple | Boolean | false | \- | N
50-
options | Array | [] | Typescript`Array<DropdownOption>` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/dropdown-item/type.ts) | N
50+
options | Array | [] | Typescript: `Array<DropdownOption>` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/dropdown-item/type.ts) | N
5151
options-columns | String / Number | 1 | \- | N
5252
options-layout | String | columns | `deprecated` | N
5353
placement | String | left | options: left/right | N
54-
value | String / Number / Array | undefined | Typescript`DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/dropdown-item/type.ts) | N
55-
default-value | String / Number / Array | undefined | uncontrolled property。Typescript`DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/dropdown-item/type.ts) | N
54+
value | String / Number / Array | undefined | Typescript: `DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/dropdown-item/type.ts) | N
55+
default-value | String / Number / Array | undefined | uncontrolled property。Typescript: `DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/dropdown-item/type.ts) | N
5656

5757
### DropdownItem Events
5858

5959
name | params | description
6060
-- | -- | --
6161
change | `(value: DropdownValue)` | \-
6262
close | \- | \-
63+
closed | \- | \-
6364
confirm | `(value: DropdownValue)` | \-
65+
open | \- | \-
66+
opened | \- | \-
6467
reset | \- | \-
6568

6669
### DropdownItem Slots

packages/products/tdesign-miniprogram/packages/components/dropdown-menu/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@ default-value | String / Number / Array | undefined | 选中值。非受控属
6060
-- | -- | --
6161
change | `(value: DropdownValue)` | 值改变时触发
6262
close | \- | 关闭时触发
63+
closed | \- | 关闭且动画结束后触发
6364
confirm | `(value: DropdownValue)` | 点击确认时触发
65+
open | \- | 打开时触发
66+
opened | \- | 打开且动画结束后触发
6467
reset | \- | 点击重置时触发
6568

6669
### DropdownItem Slots

packages/products/tdesign-mobile-react/src/dropdown-menu/dropdown-menu.en-US.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,9 @@ placement | String | left | options: left/right | N
3333
value | String / Number / Array | undefined | Typescript: `DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/dropdown-menu/type.ts) | N
3434
defaultValue | String / Number / Array | undefined | uncontrolled property。Typescript: `DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/dropdown-menu/type.ts) | N
3535
onChange | Function | | Typescript: `(value: DropdownValue) => void`<br/> | N
36+
onClose | Function | | Typescript: `() => void`<br/>`0.21.2` | N
37+
onClosed | Function | | Typescript: `() => void`<br/>`0.21.2` | N
3638
onConfirm | Function | | Typescript: `(value: DropdownValue) => void`<br/> | N
39+
onOpen | Function | | Typescript: `() => void`<br/>`0.21.2` | N
40+
onOpened | Function | | Typescript: `() => void`<br/>`0.21.2` | N
3741
onReset | Function | | Typescript: `(value: DropdownValue) => void`<br/> | N

packages/products/tdesign-mobile-react/src/dropdown-menu/dropdown-menu.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,9 @@ placement | String | left | 复选框和内容相对位置,仅单选菜单栏
3333
value | String / Number / Array | undefined | 选中值。TS 类型:`DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/dropdown-menu/type.ts) | N
3434
defaultValue | String / Number / Array | undefined | 选中值。非受控属性。TS 类型:`DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[详细类型定义](https://github.com/Tencent/tdesign-mobile-react/tree/develop/src/dropdown-menu/type.ts) | N
3535
onChange | Function | | TS 类型:`(value: DropdownValue) => void`<br/>值改变时触发 | N
36+
onClose | Function | | TS 类型:`() => void`<br/>`0.21.2`。关闭时触发 | N
37+
onClosed | Function | | TS 类型:`() => void`<br/>`0.21.2`。关闭且动画结束后触发 | N
3638
onConfirm | Function | | TS 类型:`(value: DropdownValue) => void`<br/>点击确认时触发 | N
39+
onOpen | Function | | TS 类型:`() => void`<br/>`0.21.2`。打开时触发 | N
40+
onOpened | Function | | TS 类型:`() => void`<br/>`0.21.2`。打开且动画结束后触发 | N
3741
onReset | Function | | TS 类型:`(value: DropdownValue) => void`<br/>点击重置时触发 | N

packages/products/tdesign-mobile-react/src/dropdown-menu/type.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,26 @@ export interface TdDropdownItemProps {
8989
* 值改变时触发
9090
*/
9191
onChange?: (value: DropdownValue) => void;
92+
/**
93+
* 关闭时触发
94+
*/
95+
onClose?: () => void;
96+
/**
97+
* 关闭且动画结束后触发
98+
*/
99+
onClosed?: () => void;
92100
/**
93101
* 点击确认时触发
94102
*/
95103
onConfirm?: (value: DropdownValue) => void;
104+
/**
105+
* 打开时触发
106+
*/
107+
onOpen?: () => void;
108+
/**
109+
* 打开且动画结束后触发
110+
*/
111+
onOpened?: () => void;
96112
/**
97113
* 点击重置时触发
98114
*/

packages/products/tdesign-mobile-vue/src/dropdown-menu/dropdown-item-props.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,16 @@ export default {
6565
},
6666
/** 值改变时触发 */
6767
onChange: Function as PropType<TdDropdownItemProps['onChange']>,
68+
/** 关闭时触发 */
69+
onClose: Function as PropType<TdDropdownItemProps['onClose']>,
70+
/** 关闭且动画结束后触发 */
71+
onClosed: Function as PropType<TdDropdownItemProps['onClosed']>,
6872
/** 点击确认时触发 */
6973
onConfirm: Function as PropType<TdDropdownItemProps['onConfirm']>,
74+
/** 打开时触发 */
75+
onOpen: Function as PropType<TdDropdownItemProps['onOpen']>,
76+
/** 打开且动画结束后触发 */
77+
onOpened: Function as PropType<TdDropdownItemProps['onOpened']>,
7078
/** 点击重置时触发 */
7179
onReset: Function as PropType<TdDropdownItemProps['onReset']>,
7280
};

packages/products/tdesign-mobile-vue/src/dropdown-menu/dropdown-menu.en-US.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,21 @@ placement | String | left | options: left/right | N
2929
value | String / Number / Array | undefined | `v-model` and `v-model:value` is supported。Typescript: `DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
3030
defaultValue | String / Number / Array | undefined | uncontrolled property。Typescript: `DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
3131
onChange | Function | | Typescript: `(value: DropdownValue) => void`<br/> | N
32+
onClose | Function | | Typescript: `() => void`<br/> | N
33+
onClosed | Function | | Typescript: `() => void`<br/> | N
3234
onConfirm | Function | | Typescript: `(value: DropdownValue) => void`<br/> | N
35+
onOpen | Function | | Typescript: `() => void`<br/> | N
36+
onOpened | Function | | Typescript: `() => void`<br/> | N
3337
onReset | Function | | Typescript: `(value: DropdownValue) => void`<br/> | N
3438

3539
### DropdownItem Events
3640

3741
name | params | description
3842
-- | -- | --
3943
change | `(value: DropdownValue)` | \-
44+
close | \- | \-
45+
closed | \- | \-
4046
confirm | `(value: DropdownValue)` | \-
47+
open | \- | \-
48+
opened | \- | \-
4149
reset | `(value: DropdownValue)` | \-

packages/products/tdesign-mobile-vue/src/dropdown-menu/dropdown-menu.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,21 @@ placement | String | left | 复选框和内容相对位置,仅单选菜单栏
2929
value | String / Number / Array | undefined | 选中值。支持语法糖 `v-model``v-model:value`。TS 类型:`DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
3030
defaultValue | String / Number / Array | undefined | 选中值。非受控属性。TS 类型:`DropdownValue ` `type DropdownValue = string \| number \| Array<DropdownValue>;`[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
3131
onChange | Function | | TS 类型:`(value: DropdownValue) => void`<br/>值改变时触发 | N
32+
onClose | Function | | TS 类型:`() => void`<br/>关闭时触发 | N
33+
onClosed | Function | | TS 类型:`() => void`<br/>关闭且动画结束后触发 | N
3234
onConfirm | Function | | TS 类型:`(value: DropdownValue) => void`<br/>点击确认时触发 | N
35+
onOpen | Function | | TS 类型:`() => void`<br/>打开时触发 | N
36+
onOpened | Function | | TS 类型:`() => void`<br/>打开且动画结束后触发 | N
3337
onReset | Function | | TS 类型:`(value: DropdownValue) => void`<br/>点击重置时触发 | N
3438

3539
### DropdownItem Events
3640

3741
名称 | 参数 | 描述
3842
-- | -- | --
3943
change | `(value: DropdownValue)` | 值改变时触发
44+
close | \- | 关闭时触发
45+
closed | \- | 关闭且动画结束后触发
4046
confirm | `(value: DropdownValue)` | 点击确认时触发
47+
open | \- | 打开时触发
48+
opened | \- | 打开且动画结束后触发
4149
reset | `(value: DropdownValue)` | 点击重置时触发

packages/products/tdesign-mobile-vue/src/dropdown-menu/type.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,26 @@ export interface TdDropdownItemProps {
9393
* 值改变时触发
9494
*/
9595
onChange?: (value: DropdownValue) => void;
96+
/**
97+
* 关闭时触发
98+
*/
99+
onClose?: () => void;
100+
/**
101+
* 关闭且动画结束后触发
102+
*/
103+
onClosed?: () => void;
96104
/**
97105
* 点击确认时触发
98106
*/
99107
onConfirm?: (value: DropdownValue) => void;
108+
/**
109+
* 打开时触发
110+
*/
111+
onOpen?: () => void;
112+
/**
113+
* 打开且动画结束后触发
114+
*/
115+
onOpened?: () => void;
100116
/**
101117
* 点击重置时触发
102118
*/

0 commit comments

Comments
 (0)