From bca1c474c96e4d5ece79b5be6237cf198a74a075 Mon Sep 17 00:00:00 2001 From: loopzhou <363415642@qq.com> Date: Tue, 5 Dec 2023 14:42:23 +0800 Subject: [PATCH] fix(dropdownMenu): value support array --- db/TDesign.db | Bin 856064 -> 856064 bytes .../src/dropdown-menu/dropdown-menu.en-US.md | 4 ++-- .../src/dropdown-menu/dropdown-menu.md | 4 ++-- packages/scripts/api.json | 8 +++++--- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/db/TDesign.db b/db/TDesign.db index 5debae7860f863f13bee66ecde61460c6dbfcfe4..ffcb004a2b94dc73bd186818f48535f6cdd5f02e 100644 GIT binary patch delta 307 zcmWO0ze@sf7{~GFd%u4?7Kt`gbd^v+LmawkLL9fZ7&QbpxCBBPITdx*5Ji#}-FFZ| zK^oek;k#B-xkL~R4MzV%Yt}Qo-s6W)*v^FQOk5d}d$YpSr4*e2!cI zc)Ieay=a~K5_w16>~S~Ch(u(f5S3^|Ck8QzMQqW{;zmX@T_V%+9?ExZx?6%3fZRVo3nz9`o5lPR@)l;)j*ImUm=nBcDibCge3 oaE&khnKMQVejx!KaI1j}BHh5MB-y*-_5$Awg;qM^poO)af2O8glmGw# delta 315 zcmZozVA8O_WP&uK^+XwGM(d3U>W0koxO+Bt8M1PTo}A{yz`$^5sxy#0H7ycIo|vZF zyu`YFi8Uh-GXXI(5VHU=D-g2*F*^`*05K;Ja{)2;_9fOlu_kOR3m62M?oDSe;8A0L z$k@nmogs9xp@QP{&;p)Q)7$%b!a1xTH%u(k&CTEbx0@${ar?a@o2au(WeKUl)!z%2|E6Jc;=;FsrH#V5|2z{9{DHl3$| zM`og<=yulz9wF}OHwt*%F)d1F+%8|pbAWNWLO+k(^!+6~hq!nd{xXO%I5TipPv@Ax hqrKg90#7j$6OYpNRg-uwa` `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;`。[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;`。[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`
| N onConfirm | Function | | Typescript:`(value: DropdownValue) => void`
| N diff --git a/packages/products/tdesign-mobile-vue/src/dropdown-menu/dropdown-menu.md b/packages/products/tdesign-mobile-vue/src/dropdown-menu/dropdown-menu.md index 2664b7dfa..21e81fe4d 100644 --- a/packages/products/tdesign-mobile-vue/src/dropdown-menu/dropdown-menu.md +++ b/packages/products/tdesign-mobile-vue/src/dropdown-menu/dropdown-menu.md @@ -21,8 +21,8 @@ multiple | Boolean | false | 是否多选 | N options | Array | [] | 选项数据。TS 类型:`Array` `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;`。[详细类型定义](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;`。[详细类型定义](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`
值改变时触发 | N onConfirm | Function | | TS 类型:`(value: DropdownValue) => void`
点击确认时触发 | N diff --git a/packages/scripts/api.json b/packages/scripts/api.json index 60b96b3c7..50d2dd0f7 100644 --- a/packages/scripts/api.json +++ b/packages/scripts/api.json @@ -39399,7 +39399,8 @@ "field_name": "value", "field_type": [ "1", - "2" + "2", + "16" ], "field_default_value": "undefined", "field_enum": "", @@ -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;】", "syntactic_sugar": "v-model", "readonly": 1, "html_attribute": 0, @@ -39427,7 +39428,8 @@ ], "field_type_text": [ "String", - "Number" + "Number", + "Array" ] }, {