docs: fix search grid no result (#2016)

This commit is contained in:
gimmyhehe 2024-08-31 18:01:15 +08:00 committed by GitHub
parent 9fb965d3e3
commit cdad7745e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ export default defineComponent({
const searchMenu = (value, data) => {
if (!value) return true
const trimValue = value.trim().toLowerCase()
const isGird = (trimValue === 'grid' || trimValue === '表格') && data.key?.startsWith('grid-')
const isGird = (trimValue === 'grid' || trimValue === '表格') && data.key?.startsWith('grid')
return data.label.toLowerCase().includes(value.toLowerCase()) || isGird
}

View File

@ -107,7 +107,7 @@ export default defineComponent({
.map((item) => {
const label = item.label
//
if (isGrid && item.key === 'cmp_table_components') {
if (isGrid && item.key === 'cmp-table-components') {
return { label, children: item.children }
}
const children = item.children.filter((child) => {