forked from opentiny/tiny-vue
docs: fix search grid no result (#2016)
This commit is contained in:
parent
9fb965d3e3
commit
cdad7745e4
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue