fix: 🐛 修复SelectPicker无默认值时仍会查找选择项节点的问题

 Closes: #281
This commit is contained in:
weisheng 2024-05-01 18:25:48 +08:00
parent 69303b5207
commit 130c4383dc

View File

@ -253,7 +253,7 @@ const { proxy } = getCurrentInstance() as any
function setScrollIntoView() {
let wraperSelector: string = ''
let selectorPromise: Promise<UniApp.NodeInfo | UniApp.NodeInfo[]>[] = []
if (isDef(selectList.value) && !isArray(selectList.value)) {
if (isDef(selectList.value) && selectList.value !== '' && !isArray(selectList.value)) {
wraperSelector = '#wd-radio-group'
selectorPromise = [getRect(`#radio${selectList.value}`, false, proxy)]
} else if (isArray(selectList.value) && selectList.value.length > 0) {