File tree Expand file tree Collapse file tree 4 files changed +10
-8
lines changed
Expand file tree Collapse file tree 4 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ export default defineComponent({
146146 < Cell
147147 v-slots = { { value : renderIcon } }
148148 role = "menuitem"
149- key = { option . value }
149+ key = { String ( option . value ) }
150150 icon = { option . icon }
151151 title = { option . text }
152152 class = { bem ( 'option' , { active } ) }
Original file line number Diff line number Diff line change @@ -2,10 +2,12 @@ import type { DropdownItemProps } from './DropdownItem';
22import type { VNode , ComponentPublicInstance } from 'vue' ;
33import type { Numeric } from '../utils' ;
44
5+ export type DropdownItemOptionValue = Numeric | boolean ;
6+
57export type DropdownItemOption = {
68 text : string ;
79 icon ?: string ;
8- value : Numeric ;
10+ value : DropdownItemOptionValue ;
911} ;
1012
1113export type DropdownItemExpose = {
Original file line number Diff line number Diff line change @@ -248,11 +248,11 @@ dropdownItemRef.value?.toggle();
248248
249249### Data Structure of Option
250250
251- | Key | Description | Type |
252- | ----- | ----------- | ------------------ |
253- | text | Text | _ string_ |
254- | value | Value | _ number \| string _ |
255- | icon | Left icon | _ string_ |
251+ | Key | Description | Type |
252+ | ----- | ----------- | ----------------------------- |
253+ | text | Text | _ string_ |
254+ | value | Value | _ number \| string \| boolean _ |
255+ | icon | Left icon | _ string_ |
256256
257257## Theming
258258
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ dropdownItemRef.value?.toggle();
255255| 键名 | 说明 | 类型 |
256256| --- | --- | --- |
257257| text | 文字 | _ string_ |
258- | value | 标识符 | _ number \| string _ |
258+ | value | 标识符 | _ number \| string \| boolean _ |
259259| icon | 左侧图标名称或图片链接,等同于 Icon 组件的 [ name 属性] ( #/zh-CN/icon#props ) | _ string_ |
260260
261261## 主题定制
You can’t perform that action at this time.
0 commit comments