getCurrentColumnIndex static method
确定当前 Item 在第几层级
Implementation
static int getCurrentColumnIndex(PickerEntity? currentItem) {
int listIndex = -1;
if (currentItem != null) {
listIndex = 0;
var parent = currentItem.parent;
while (parent != null) {
listIndex++;
parent = parent.parent;
}
}
return listIndex;
}