2025-01-02 09:34:13 +08:00
|
|
|
<route lang="json5" type="page">
|
|
|
|
|
{
|
|
|
|
|
layout: 'default',
|
|
|
|
|
style: {
|
|
|
|
|
navigationStyle: 'custom'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</route>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-01-03 10:01:30 +08:00
|
|
|
<TopNavigation :title="titleTab[curIndex]"></TopNavigation>
|
|
|
|
|
<scroll-view class="h-[calc(100vh-50px-60px)]" scroll-y>
|
2025-01-02 09:34:13 +08:00
|
|
|
<view v-for="(item, index) in pages" :key="index" v-show="curIndex == index">
|
|
|
|
|
<component :is="item"></component>
|
|
|
|
|
</view>
|
2025-01-03 10:01:30 +08:00
|
|
|
</scroll-view>
|
2025-01-02 09:34:13 +08:00
|
|
|
<CustomTabBar :list="list" :default-index="0" @change="change"></CustomTabBar>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2025-01-03 10:01:30 +08:00
|
|
|
import AttendanceClockIn from './AttendanceClockIn.vue'
|
|
|
|
|
import AttendanceStatistics from './AttendanceStatistics.vue'
|
|
|
|
|
import AttendanceSet from './AttendanceSet.vue'
|
2025-01-02 09:34:13 +08:00
|
|
|
const pages = [AttendanceClockIn, AttendanceStatistics, AttendanceSet]
|
2025-01-03 10:01:30 +08:00
|
|
|
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>
|