feat: 新增目标管理功能及相关组件
- 创建目标管理演示页面,展示高保真的目标管理界面 - 实现待办事项卡片的横向滑动展示,支持时间筛选功能 - 新增时间轴组件,展示选中日期的具体任务 - 更新底部导航,添加目标管理和演示页面的路由 - 优化个人页面菜单项,提供目标管理的快速访问 - 编写目标管理功能实现文档,详细描述功能和组件架构
This commit is contained in:
@@ -21,6 +21,7 @@ export default function TabLayout() {
|
||||
const routeName = route.name;
|
||||
const isSelected = (routeName === 'explore' && pathname === ROUTES.TAB_EXPLORE) ||
|
||||
(routeName === 'coach' && pathname === ROUTES.TAB_COACH) ||
|
||||
(routeName === 'goals' && pathname === ROUTES.TAB_GOALS) ||
|
||||
(routeName === 'statistics' && pathname === ROUTES.TAB_STATISTICS) ||
|
||||
pathname.includes(routeName);
|
||||
|
||||
@@ -44,6 +45,8 @@ export default function TabLayout() {
|
||||
return { icon: 'magnifyingglass.circle.fill', title: '发现' } as const;
|
||||
case 'coach':
|
||||
return { icon: 'person.3.fill', title: 'Seal' } as const;
|
||||
case 'goals':
|
||||
return { icon: 'flag.fill', title: '目标' } as const;
|
||||
case 'statistics':
|
||||
return { icon: 'chart.pie.fill', title: '统计' } as const;
|
||||
case 'personal':
|
||||
@@ -185,6 +188,7 @@ export default function TabLayout() {
|
||||
},
|
||||
}}
|
||||
/>
|
||||
|
||||
<Tabs.Screen
|
||||
name="statistics"
|
||||
options={{
|
||||
@@ -213,7 +217,34 @@ export default function TabLayout() {
|
||||
},
|
||||
}}
|
||||
/>
|
||||
|
||||
<Tabs.Screen
|
||||
name="goals"
|
||||
options={{
|
||||
title: '目标',
|
||||
tabBarIcon: ({ color }) => {
|
||||
const isGoalsSelected = pathname === '/goals';
|
||||
return (
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
||||
<IconSymbol size={22} name="flag.fill" color={color} />
|
||||
{isGoalsSelected && (
|
||||
<Text
|
||||
numberOfLines={1}
|
||||
style={{
|
||||
color: color,
|
||||
fontSize: 12,
|
||||
fontWeight: '600',
|
||||
marginLeft: 6,
|
||||
textAlign: 'center',
|
||||
flexShrink: 0,
|
||||
}}>
|
||||
目标
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
},
|
||||
}}
|
||||
/>
|
||||
<Tabs.Screen
|
||||
name="personal"
|
||||
options={{
|
||||
|
||||
Reference in New Issue
Block a user