廓形仪rn版本-技术调研
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

98 lines
2.9 KiB

  1. import { ThemedText } from '@/components/ThemedText';
  2. import { View, ScrollView, Text, StyleSheet, Pressable } from 'react-native';
  3. import { Link, useRouter } from 'expo-router';
  4. import StatusItem from '@/components/ui/StatusItem';
  5. import { useState } from 'react';
  6. // import { Modal, Portal } from 'react-native-paper';
  7. import { Button, ButtonText } from "@/components/ui/button";
  8. export default function Index() {
  9. const router = useRouter();
  10. return (
  11. <>
  12. <ScrollView style={{ backgroundColor: '#f6f7fb' }}>
  13. <View style={{ height: 300, backgroundColor: '#ccc' }}></View>
  14. <View style={styles.config}>
  15. <Text>//线/</Text>
  16. <Link href={'/setting'} style={{ color: '#3165D2' }}>
  17. </Link>
  18. </View>
  19. <View style={styles.btnBox}>
  20. <Button style={styles.btn} size="md" variant="solid" action="primary" >
  21. <ButtonText></ButtonText>
  22. </Button>
  23. <Button style={styles.btn} size="md" variant="solid" action="primary" onPress={()=>router.push('/save')} >
  24. <ButtonText></ButtonText>
  25. </Button>
  26. {/* <Pressable
  27. style={({ pressed }) => [styles.btn, { opacity: pressed ? 0.7 : 1 }]}
  28. onPress={() => {}}>
  29. <Text style={styles.btnText}></Text>
  30. </Pressable>
  31. <Pressable
  32. style={({ pressed }) => [styles.btn, { opacity: pressed ? 0.7 : 1 }]}
  33. onPress={showModal}>
  34. <Text style={styles.btnText}></Text>
  35. </Pressable> */}
  36. </View>
  37. <View style={styles.statusBox}>
  38. <View style={styles.subStatus}>
  39. <StatusItem text={'移到顶部停留2秒'} />
  40. <StatusItem text={'开始测量左侧'} />
  41. <StatusItem text={'左侧测量完成'} />
  42. </View>
  43. <View style={styles.subStatus}>
  44. <StatusItem text={'移到顶部停留2秒'} />
  45. <StatusItem text={'开始测量右侧'} />
  46. <StatusItem text={'右侧测量完成'} />
  47. </View>
  48. </View>
  49. </ScrollView>
  50. </>
  51. );
  52. }
  53. const styles = StyleSheet.create({
  54. config: {
  55. height: 40,
  56. backgroundColor: '#e3e8f5',
  57. flexDirection: 'row',
  58. justifyContent: 'space-between',
  59. alignItems: 'center',
  60. paddingHorizontal: 16,
  61. },
  62. btnBox: {
  63. flexDirection: 'row',
  64. paddingHorizontal: 20,
  65. justifyContent: 'space-between',
  66. gap: 20,
  67. marginVertical: 16,
  68. },
  69. btn: {
  70. flex: 1,
  71. height: 40,
  72. // borderRadius: 4,
  73. // color: '#fff',
  74. // lineHeight: 40,
  75. // justifyContent: 'center',
  76. backgroundColor: '#3165D2',
  77. },
  78. btnText: {
  79. color: '#FFF',
  80. textAlign: 'center',
  81. fontSize: 16,
  82. },
  83. statusBox: {
  84. flexDirection: 'row',
  85. paddingHorizontal: 16,
  86. gap: 16,
  87. marginBottom: 16,
  88. },
  89. subStatus: {
  90. flex: 1,
  91. gap: 10,
  92. },
  93. });