mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
docs: fix type error for autocomplete (#18762)
This commit is contained in:
parent
98c742272d
commit
6fa9f78a65
@ -37,8 +37,8 @@ const querySearch = (queryString: string, cb) => {
|
||||
// call callback function to return suggestion objects
|
||||
cb(results)
|
||||
}
|
||||
const createFilter = (queryString) => {
|
||||
return (restaurant) => {
|
||||
const createFilter = (queryString: string) => {
|
||||
return (restaurant: LinkItem) => {
|
||||
return (
|
||||
restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
|
||||
)
|
||||
@ -55,7 +55,7 @@ const loadAll = () => {
|
||||
{ value: 'babel', link: 'https://github.com/babel/babel' },
|
||||
]
|
||||
}
|
||||
const handleSelect = (item: LinkItem) => {
|
||||
const handleSelect = (item: Record<string, any>) => {
|
||||
console.log(item)
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ const loadAll = () => {
|
||||
]
|
||||
}
|
||||
|
||||
const handleSelect = (item: RestaurantItem) => {
|
||||
const handleSelect = (item: Record<string, any>) => {
|
||||
console.log(item)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user