|
|
@@ -23,7 +23,7 @@ const Component = forwardRef((props: {
|
|
|
endTimestamp?: number,
|
|
|
isTimeout?: boolean,
|
|
|
isLoading?: boolean,
|
|
|
- hidenEndTime?:boolean
|
|
|
+ hidenEndTime?: boolean
|
|
|
}, ref) => {
|
|
|
const today = new Date();
|
|
|
const [loaded, setLoaded] = useState(false)
|
|
|
@@ -209,43 +209,43 @@ const Component = forwardRef((props: {
|
|
|
function pickerDetail() {
|
|
|
return <View style={{ display: 'flex', flexDirection: 'column', opacity: loaded ? 1 : 0 }}>
|
|
|
<Text className='modal_title' style={{ color: color }}>{props.title ? props.title : '测试标题 '}</Text>
|
|
|
- <View style={{ backgroundColor: 'transparent', position: 'relative' }}>
|
|
|
- <PickerView
|
|
|
- itemStyle={{ color: '#fff', margin: 0, padding: 0 }}
|
|
|
- value={values}
|
|
|
- className="picker"
|
|
|
- maskClass="picker-mask"
|
|
|
- style={{ color: '#fff' }}
|
|
|
- onChange={onPickerChange}
|
|
|
- immediateChange={true}
|
|
|
- indicatorStyle='height: 50px;color:red;'>
|
|
|
- <PickerViewColumn style='flex:0 0 45%'>
|
|
|
- {days.map((item,i) => {
|
|
|
- return (
|
|
|
- <View key={i} style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff',height:50 }}>{item}</View>
|
|
|
- );
|
|
|
- })}
|
|
|
- </PickerViewColumn>
|
|
|
- <PickerViewColumn>
|
|
|
- {hours.map((item,j) => {
|
|
|
- return (
|
|
|
- <View key={j*1000} style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff',height:50 }}>{item < 10 ? `0${item}` : item}</View>
|
|
|
- );
|
|
|
- })}
|
|
|
- </PickerViewColumn>
|
|
|
- <PickerViewColumn>
|
|
|
- {minutes.map((item,k) => {
|
|
|
- return (
|
|
|
- <View key={k*10000} style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff',height:50 }}>{item < 10 ? `0${item}` : item}</View>
|
|
|
- );
|
|
|
- })}
|
|
|
- </PickerViewColumn>
|
|
|
- </PickerView>
|
|
|
- </View>
|
|
|
+
|
|
|
+ <PickerView
|
|
|
+ itemStyle={{ color: '#fff', margin: 0, padding: 0 }}
|
|
|
+ value={values}
|
|
|
+ className="picker"
|
|
|
+ maskClass="picker-mask"
|
|
|
+ style={{ color: '#fff' }}
|
|
|
+ onChange={onPickerChange}
|
|
|
+ immediateChange={true}
|
|
|
+ indicatorStyle='height: 50px;color:red;'>
|
|
|
+ <PickerViewColumn style='flex:0 0 45%'>
|
|
|
+ {days.map((item, i) => {
|
|
|
+ return (
|
|
|
+ <View key={i} style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff', height: 50 }}>{item}</View>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </PickerViewColumn>
|
|
|
+ <PickerViewColumn>
|
|
|
+ {hours.map((item, j) => {
|
|
|
+ return (
|
|
|
+ <View key={j * 1000} style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff', height: 50 }}>{item < 10 ? `0${item}` : item}</View>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </PickerViewColumn>
|
|
|
+ <PickerViewColumn>
|
|
|
+ {minutes.map((item, k) => {
|
|
|
+ return (
|
|
|
+ <View key={k * 10000} style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#fff', height: 50 }}>{item < 10 ? `0${item}` : item}</View>
|
|
|
+ );
|
|
|
+ })}
|
|
|
+ </PickerViewColumn>
|
|
|
+ </PickerView>
|
|
|
+
|
|
|
{
|
|
|
!props.hidenEndTime && <Text className="pickerEndTime" style={{ color: props.isTimeout ? 'red' : '#ffffff' }}>{pickerTimeText()}</Text>
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
<View className='modal_operate'>
|
|
|
<View className='modal_btn' style={{ backgroundColor: color + alpha }} onClick={cancel}>
|
|
|
<Text className='modal_cancel_text' style={{ color: color, fontWeight: 'bold' }}>{t('feature.common.picker_cancel_btn')}</Text>
|