js const getRegions = async () => { try { let ids = ""; if (props.modelValue.length > 0) { ids = props.modelValue.join(","); } const result = await getRegionByIds(ids); regionList.value.splice(0) Object.assign(regionList.value, result); if (regionList.value.length > 1) { if (regionList.value[regionList.value.length - 1].length > 0) { showIndex.value = regionList.value.length - 1; } else { showIndex.value = regionList.value.length - 2; } } else { showIndex.value = 0; } } catch (error) { } finally { } };
regionList.value.splice(0) // 待补充
js const getRegions = async () => { try { let ids = ""; if (props.modelValue.length > 0) { ids = props.modelValue.join(","); } const result = await getRegionByIds(ids); regionList.value.splice(0) Object.assign(regionList.value, result); if (regionList.value.length > 1) { if (regionList.value[regionList.value.length - 1].length > 0) { showIndex.value = regionList.value.length - 1; } else { showIndex.value = regionList.value.length - 2; } } else { showIndex.value = 0; } } catch (error) { } finally { } };regionList.value.splice(0) // 待补充