Skip to content

Commit

Permalink
fix(dropdownMenu): value support array
Browse files Browse the repository at this point in the history
  • Loading branch information
LoopZhou committed Dec 5, 2023
1 parent 3e767c5 commit bca1c47
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ multiple | Boolean | false | \- | N
options | Array | [] | Typescript:`Array<DropdownOption>` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
optionsColumns | String / Number | 1 | \- | N
optionsLayout | String | columns | `deprecated` | N
value | String / Number | undefined | `v-model` and `v-model:value` is supported。Typescript:`DropdownValue ` `type DropdownValue = string \| number;`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
defaultValue | String / Number | undefined | uncontrolled property。Typescript:`DropdownValue ` `type DropdownValue = string \| number;`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
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
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
visible | Boolean | false | \- | N
onChange | Function | | Typescript:`(value: DropdownValue) => void`<br/> | N
onConfirm | Function | | Typescript:`(value: DropdownValue) => void`<br/> | N
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ multiple | Boolean | false | 是否多选 | N
options | Array | [] | 选项数据。TS 类型:`Array<DropdownOption>` `interface DropdownOption { label: string; disabled: boolean; value: DropdownValue; }`[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
optionsColumns | String / Number | 1 | 选项分栏(1-3) | N
optionsLayout | String | columns | 已废弃。选项排列;不再支持 tree 布局,可与 treeSelect 配合使用 | N
value | String / Number | undefined | 选中值。支持语法糖 `v-model``v-model:value`。TS 类型:`DropdownValue ` `type DropdownValue = string \| number;`[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
defaultValue | String / Number | undefined | 选中值。非受控属性。TS 类型:`DropdownValue ` `type DropdownValue = string \| number;`[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/dropdown-menu/type.ts) | N
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
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
visible | Boolean | false | 是否展示 | N
onChange | Function | | TS 类型:`(value: DropdownValue) => void`<br/>值改变时触发 | N
onConfirm | Function | | TS 类型:`(value: DropdownValue) => void`<br/>点击确认时触发 | N
Expand Down
8 changes: 5 additions & 3 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -39399,7 +39399,8 @@
"field_name": "value",
"field_type": [
"1",
"2"
"2",
"16"
],
"field_default_value": "undefined",
"field_enum": "",
Expand All @@ -39410,7 +39411,7 @@
"create_time": "2023-05-24 16:50:58",
"update_time": "2023-05-24 16:50:58",
"event_output": null,
"custom_field_type": "DropdownValue 【type DropdownValue = string | number;】",
"custom_field_type": "DropdownValue 【type DropdownValue = string | number | Array<DropdownValue>;】",
"syntactic_sugar": "v-model",
"readonly": 1,
"html_attribute": 0,
Expand All @@ -39427,7 +39428,8 @@
],
"field_type_text": [
"String",
"Number"
"Number",
"Array"
]
},
{
Expand Down

0 comments on commit bca1c47

Please sign in to comment.