0

版本:@react-native-picker/picker 1.14.0 代码:

<Picker
              selectedValue={hours}
              onValueChange={handleHourChanged}
              style={{ flex: 1, justifyContent: "center" }}
              itemStyle={{
                textAlign: "center",
              }}
            >
              {hour.map(v => {
                return <Picker.Item label={v.toString()} value={v} />;
              })}
            </Picker>

实际截图:

图片

预期的:

图片

4

0 回答 0