fix(SelectComponent): 修复选择组件在索引为-1时的默认值处理
当 selectIndex 为 -1 时,将其重置为 0 以避免访问无效数组元素。 同时优化了监听器中的索引查找逻辑,确保在找不到匹配项时也设置默认值。
Showing
1 changed file
with
5 additions
and
2 deletions
-
Please register or sign in to post a comment
当 selectIndex 为 -1 时,将其重置为 0 以避免访问无效数组元素。 同时优化了监听器中的索引查找逻辑,确保在找不到匹配项时也设置默认值。