grtsinry43 5c3d956de9
feat: Add "Task List" and "Settings" pages with initial navigation setup
- Created `pages/list` for managing and displaying to-do tasks.
- Created `pages/settings` as a placeholder for application settings.
- Updated `pages/index` for a refreshed layout with navigation to "Tasks" and "Settings".
- Integrated custom tab bar across all pages for seamless transitions.
2025-06-09 13:30:02 +08:00

19 lines
439 B
TypeScript

// pages/settings/settings.ts
Component({
data: {
activeTab: 'settings', // For tab bar
},
methods: {
onTabChange(e: any) {
const targetPage = e.detail.value;
if (targetPage === 'home') {
wx.switchTab({ url: '/pages/index/index' });
} else if (targetPage === 'list') {
wx.switchTab({ url: '/pages/list/list' });
}
// No need to navigate if already on 'settings'
},
},
});