<template>
<view>
<view v-if="current==0">
<view style="display: flex;margin: 34rpx 0 0 30rpx;">
<view style="width: 300rpx;height: 153rpx;display: flex;flex-direction: column;background: #F7F7F7;">
<text style="margin:24rpx 0 0 24rpx;font-size: 30rpx;color: #333333;">上班时间-8:30</text>
<view style="margin:14rpx 0 0 24rpx">
<u-icon name="checkmark" color="#2979ff" size="28"></u-icon>
<text style="margin-left: 5rpx;font-size: 24rpx;color: #999999;">上班时间-8:30</text>
</view>
</view>
<view style="margin-left: 82rpx;width: 300rpx;height: 153rpx;display: flex;flex-direction: column;background: #F7F7F7;">
<text style="margin:24rpx 0 0 24rpx;
font-size: 30rpx;color: #333333;">上班时间-8:30</text>
<view style="margin:14rpx 0 0 24rpx">
<text style="font-size: 24rpx;color: #999999;">上班时间-8:30</text>
</view>
</view>
</view>
<view style="margin: 112rpx 0 0 218rpx;width: 315rpx;height: 315rpx;display: flex;justify-content: center;align-items: center;">
<view style="border-radius: 217rpx;width: 217rpx;height: 217rpx;background: linear-gradient(91deg, #43B9FD 0%, #1FB5FE 100%);display: flex;flex-direction: column;justify-content: center;align-items: center;">
<text style="color: #FFFFFF;">
下班打卡
</text>
<text style="color: #FFFFFF;">
15:03:03
</text>
</view>
</view>
<view>
<u-icon style="margin-left:231rpx;font-size:30rpx;" name="checkmark" color="#2979ff" size="28"></u-icon>
<text style="margin-left:10rpx;font-size:28rpx;color:#666666;">已进入考勤管理</text>
<u-icon style="margin-left:10rpx;font-size:30rpx;" name="reload" color="#2979ff" size="28"></u-icon>
</view>
</view>
<u-tabbar v-model="current" :list="list" :current="current" :mid-button="true" @change="change"></u-tabbar>
<view v-if="current==1" style="display: flex;flex-direction: column;justify-content: center;
">
<view style="display: flex;justify-content: center;">
<u-icon name="arrow-left" style="margin-right: 24rpx;"></u-icon>
<text>2020.10.12</text>
<u-icon name="arrow-right" style="margin-left: 24rpx;"></u-icon>
</view style="display: flex;justify-content: center;">
<view style="margin:40rpx 0 0 30rpx;width: 690rpx;height: 210rpx;background: #FFFFFF;box-shadow: 0px 0px 16px #F0F0F0;display: flex;flex-direction: column;">
<view style="display: flex;">
<view style="margin:52rpx 0 0 34rpx;width: 20rpx;height: 20rpx;border-radius: 20rpx;background: #F29100;"></view>
<text style="margin:41rpx 0 0 34rpx;font-size: 30rpx;">上班打卡</text>
<view style="margin:34rpx 0 0 34rpx;width: 150rpx;height: 56rpx;border:5rpx solid #F29100;text-align: center;line-height: 46rpx;">
<text style="color:#F29100;font-size: 28rpx;">迟到</text>
</view>
</view>
<view style="display: flex;">
<view style="margin:52rpx 0 0 34rpx;width: 20rpx;height: 20rpx;border-radius: 20rpx;background: #2B85E4;"></view>
<text style="margin:41rpx 0 0 34rpx;font-size: 30rpx;">下班迟到</text>
<view style="margin:34rpx 0 0 34rpx;width: 150rpx;height: 56rpx;border:5rpx solid #2B85E4;text-align: center;line-height: 46rpx;">
<text style="color:#2B85E4;font-size: 28rpx;">迟到</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
/* current==0 */
list: [{
iconPath: "home",
selectedIconPath: "home-fill",
text: '打卡',
customIcon: false,
},
{
iconPath: "photo",
selectedIconPath: "photo-fill",
text: '打卡记录',
customIcon: false,
},
],
current: 1,
/* current==1 */
}
},
methods: {
change(index) {
this.current = index;
console.log(this.current)
}
}
}
</script>
<style>
</style>
运行结果

浙公网安备 33010602011771号