Browse Source

测量参数设置页面

master
zhangjiming 3 months ago
parent
commit
832c42d641
  1. 123
      app/(tabs)/(home)/save.tsx

123
app/(tabs)/(home)/save.tsx

@ -1,76 +1,103 @@
import { useState } from 'react'; import { useState } from 'react';
import { View, Text, Pressable, Image, TextInput, StyleSheet } from 'react-native'; import { View, Text, Pressable, Image, TextInput, StyleSheet } from 'react-native';
import {
Select,
SelectTrigger,
SelectInput,
SelectIcon,
SelectPortal,
SelectBackdrop,
SelectContent,
SelectDragIndicator,
SelectDragIndicatorWrapper,
SelectItem,
} from '@/components/ui/select';
import { ChevronRightIcon } from '@/components/ui/icon';
import { Button, ButtonText } from '@/components/ui/button';
export default function Save() { export default function Save() {
const [selectedLanguage, setSelectedLanguage] = useState(); const [selectedLanguage, setSelectedLanguage] = useState();
return ( return (
<View style={styles.model}>
<View style={styles.itemBox}>
<Text style={styles.itemTitle}></Text>
<TextInput style={styles.itemInput} placeholder="请填写"></TextInput>
</View>
<View style={styles.itemBox} >
<Text style={styles.itemTitle}></Text>
<View className="bg-[#f6f7fb]">
<View className="px-5 mt-2 bg-white">
<View style={styles.itemBox}>
<Text></Text>
<TextInput style={styles.itemInput} placeholder="请填写"></TextInput>
</View>
<View style={styles.itemBox}>
<Select className="h-full">
<SelectTrigger className='h-full border-b-0' variant="underlined" size="md">
<View className="flex-row items-center w-full">
<Text></Text>
<Text className="ml-auto">60</Text>
<SelectIcon className="ml-2" as={ChevronRightIcon} />
</View>
</SelectTrigger>
<SelectPortal>
<SelectBackdrop />
<SelectContent>
<SelectDragIndicatorWrapper>
<SelectDragIndicator />
</SelectDragIndicatorWrapper>
<SelectItem label="UX Research" value="ux" />
<SelectItem label="Web Development" value="web" />
<SelectItem label="Cross Platform" value="Development Process" />
<SelectItem label="UI Designing" value="ui" isDisabled={true} />
<SelectItem label="Backend Development" value="backend" />
</SelectContent>
</SelectPortal>
</Select>
</View>
<View style={styles.itemBox}>
<Select className="h-full">
<SelectTrigger className='h-full border-b-0' variant="underlined" size="md">
<View className="flex-row items-center w-full">
<Text></Text>
<Text className="ml-auto">-</Text>
<SelectIcon className="ml-2" as={ChevronRightIcon} />
</View>
</SelectTrigger>
<SelectPortal>
<SelectBackdrop />
<SelectContent>
<SelectDragIndicatorWrapper>
<SelectDragIndicator />
</SelectDragIndicatorWrapper>
<SelectItem label="UX Research" value="ux" />
<SelectItem label="Web Development" value="web" />
<SelectItem label="Cross Platform" value="Development Process" />
<SelectItem label="UI Designing" value="ui" isDisabled={true} />
<SelectItem label="Backend Development" value="backend" />
</SelectContent>
</SelectPortal>
</Select>
</View>
</View> </View>
<View style={styles.itemBox}>
<Text style={styles.itemTitle}></Text>
<TextInput style={styles.itemInput} placeholder="请填写"></TextInput>
</View>
<Pressable
style={({ pressed }) => [styles.btn, { opacity: pressed ? 0.7 : 1 }]}
onPress={() => {}}>
<Text style={styles.btnText}></Text>
</Pressable>
<Button className="h-12 mt-10 mx-9 bg-[#3165D2]">
<ButtonText></ButtonText>
</Button>
</View> </View>
); );
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
model: {
form: {
position: 'relative', position: 'relative',
padding: 8,
},
close: {
position: 'absolute',
right: 0,
top: 0,
padding: 12,
},
title: {
textAlign: 'center',
fontSize: 16,
fontWeight: 500,
marginBottom: 20,
paddingHorizontal: 16,
}, },
itemBox: { itemBox: {
backgroundColor: '#FAFAFA',
height: 50, height: 50,
borderRadius: 4,
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
paddingHorizontal: 12,
justifyContent: 'space-between', justifyContent: 'space-between',
gap: 8, gap: 8,
fontSize: 14, fontSize: 14,
borderBottomWidth: 1,
borderBottomColor: '#eeeeee'
}, },
itemTitle: {},
itemInput: { itemInput: {
flex: 1, flex: 1,
height: '100%', height: '100%',
textAlign: 'right', textAlign: 'right',
}, },
btn: {
height: 44,
borderRadius: 6,
color: '#fff',
justifyContent: 'center',
backgroundColor: '#3165D2',
marginTop: 16,
},
btnText: {
color: '#FFF',
textAlign: 'center',
fontSize: 16,
},
}); });
Loading…
Cancel
Save