54 lines
1.4 KiB
Vue
Raw Normal View History

2025-01-02 09:34:13 +08:00
<route lang="json5" type="page">
{
layout: 'default',
style: {
navigationStyle: 'custom'
}
}
</route>
<template>
2025-01-07 17:00:29 +08:00
<view class="h-[calc(100vh-50px)] flex flex-col">
<TopNavigation :title="titleTab[curIndex]"></TopNavigation>
<scroll-view class="flex-1 box-border" scroll-y>
<AttendanceClockIn v-show="curIndex === 0"></AttendanceClockIn>
<AttendanceStatistics v-show="curIndex === 1"></AttendanceStatistics>
<AttendanceSet v-show="curIndex === 2"></AttendanceSet>
2025-01-07 17:00:29 +08:00
</scroll-view>
</view>
2025-01-02 09:34:13 +08:00
<CustomTabBar :list="list" :default-index="0" @change="change"></CustomTabBar>
</template>
<script lang="ts" setup>
import AttendanceClockIn from './AttendanceClockIn.vue'
import AttendanceStatistics from './AttendanceStatistics.vue'
import AttendanceSet from './AttendanceSet.vue'
2025-01-06 17:21:30 +08:00
import { TabBarItem } from '@/typings'
2025-01-02 09:34:13 +08:00
const pages = [AttendanceClockIn, AttendanceStatistics, AttendanceSet]
const titleTab = ['考勤打卡', '考勤统计', '设置']
2025-01-02 09:34:13 +08:00
const list = ref<Array<TabBarItem>>([
{
title: '打卡',
icon: 'home'
},
{
title: '统计',
icon: 'notification'
},
{
title: '设置',
icon: 'setting'
}
])
const curIndex = ref(0)
const change = (data: { value: number }) => {
curIndex.value = data.value
}
</script>
<style lang="scss" scoped>
page {
background-color: #f6f8fc;
}
</style>