| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- import GradientText from "@/components/basic/GradientText";
- import { View, PickerView, PickerViewColumn } from "@tarojs/components";
- import { useEffect, useLayoutEffect, useRef, useState } from "react";
- import { LayoutChangeEvent, Text } from "react-native";
- export default function DemoA() {
- useEffect(() => {
- }, [])
- const years = [0, 1, 2, 3, 4, 5]
- const months = [0, 1, 2, 3, 4, 5]
- const days = [0, 1, 2, 3, 4, 5]
- return (
- <View style={{ backgroundColor: 'white', height: 800, width: 375 }} >
- <Text style={{ color: 'red', fontSize: 50 }}>hello world</Text>
- <PickerView title="hhhh" itemStyle={{ color: '#000', fonSize: 10 }} indicatorStyle='height: 50px;' style='width: 100%; height: 300px;color:white' value={[0, 1, 2, 3, 4]} onChange={(e) => { }}>
- <PickerViewColumn style={{ color: '#fff' }}>
- {years.map(item => {
- return (
- <View style={{ color: 'white', opacity: 0, backgroundColor: 'pink' }}>{item}年</View>
- );
- })}
- </PickerViewColumn>
- <PickerViewColumn>
- {months.map(item => {
- return (
- <View>{item}月12日</View>
- )
- })}
- </PickerViewColumn>
- <PickerViewColumn>
- {days.map(item => {
- return (
- <View>{item}日</View>
- )
- })}
- </PickerViewColumn>
- </PickerView>
- <GradientText style={{fontSize:20}}>Hello world</GradientText>
- </View>
- );
- }
|