mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 02:08:12 +08:00
fix(components): [segmented] item may be undefined (#18199)
* fix(components): [segmented] item may be undefined * fix(components): [segmented] ts type error * fix(components): [segmented] Update document Option ts type
This commit is contained in:
parent
f77c390170
commit
9123a05826
@ -101,7 +101,6 @@ type Option =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined
|
||||
```
|
||||
|
||||
</details>
|
||||
|
@ -85,7 +85,7 @@ const getLabel = (item: Option) => {
|
||||
return isObject(item) ? item.label : item
|
||||
}
|
||||
|
||||
const getDisabled = (item: Option) => {
|
||||
const getDisabled = (item: Option | undefined) => {
|
||||
return !!(_disabled.value || (isObject(item) ? item.disabled : false))
|
||||
}
|
||||
|
||||
|
@ -8,4 +8,3 @@ export type Option =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| undefined
|
||||
|
Loading…
Reference in New Issue
Block a user