智能算法bug-修改

This commit is contained in:
851673013@qq.com 2022-07-01 17:57:08 +08:00
parent 935c80ee87
commit 17fc21cf1e
1 changed files with 11 additions and 6 deletions

View File

@ -119,9 +119,12 @@
'props.dataList.infoList==============>', 'props.dataList.infoList==============>',
navList.value.filter((item) => item.name === list.value[0]) navList.value.filter((item) => item.name === list.value[0])
) )
select.value = navList.value.filter( if (navList.value.filter((item) => item.name === list.value[0])[0]) {
(item) => item.name === list.value[0] debugger
)[0].key select.value = navList.value.filter(
(item) => item.name === list.value[0]
)[0].key
}
console.log('11111111111111111111111111', list.value, navList.value) console.log('11111111111111111111111111', list.value, navList.value)
} }
watch( watch(
@ -161,9 +164,11 @@
} }
}) })
if (list.value.length > 0) { if (list.value.length > 0) {
select.value = navList.value.filter( if (navList.value.filter((item) => item.name === list.value[0])[0]) {
(item) => item.name === list.value[0] select.value = navList.value.filter(
)[0].key (item) => item.name === list.value[0]
)[0].key
}
} }
console.log('11111111111111111111111111', list.value, navList.value) console.log('11111111111111111111111111', list.value, navList.value)
} }