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:
ve 2024-09-13 17:36:42 +08:00 committed by GitHub
parent f77c390170
commit 9123a05826
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 3 deletions

View File

@ -101,7 +101,6 @@ type Option =
| string
| number
| boolean
| undefined
```
</details>

View File

@ -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))
}

View File

@ -8,4 +8,3 @@ export type Option =
| string
| number
| boolean
| undefined