feat: 更新用户资料编辑功能及相关组件
- 在 EditProfileScreen 中新增活动水平字段,支持用户设置和保存活动水平 - 更新个人信息卡片,增加活动水平的展示和编辑功能 - 在 ProfileCard 组件中优化样式,提升用户体验 - 更新 package.json 和 package-lock.json,新增 @react-native-picker/picker 依赖 - 在多个组件中引入 expo-image,优化图片加载和展示效果
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { TaskListItem } from '@/types/goals';
|
||||
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
|
||||
import { Image } from 'expo-image';
|
||||
import { useRouter } from 'expo-router';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
||||
@@ -35,7 +36,11 @@ export const TaskProgressCard: React.FC<TaskProgressCardProps> = ({
|
||||
style={styles.goalsIconButton}
|
||||
onPress={handleNavigateToGoals}
|
||||
>
|
||||
<MaterialIcons name="flag" size={18} color="#7A5AF8" />
|
||||
<Image
|
||||
source={{ uri: 'https://plates-1251306435.cos.ap-guangzhou.myqcloud.com/images/icons/icon-goal-edit.png' }}
|
||||
style={{ width: 18, height: 18 }}
|
||||
cachePolicy="memory-disk"
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
<View style={styles.headerActions}>
|
||||
@@ -117,6 +122,8 @@ const styles = StyleSheet.create({
|
||||
gap: 8,
|
||||
},
|
||||
goalsIconButton: {
|
||||
width: 24,
|
||||
height: 24,
|
||||
},
|
||||
title: {
|
||||
fontSize: 20,
|
||||
|
||||
Reference in New Issue
Block a user