<template>
    <view class="flex justify-between mb-[28rpx] px-[32rpx]">
        <text>{{ parseDate }}</text>
        <view class="flex gap-[8rpx] items-center text-primary text-[28rpx]" @click="handleMore">
            <text>查看更多</text>
            <TIcon name="icon-more" color="#0E66FB" :size="14" />
        </view>
    </view>
</template>

<script setup lang="ts">
import dayjs from 'dayjs'
import { computed } from 'vue'

const props = defineProps({
    curDate: {
        type: Number,
        default: new Date().getTime()
    },
    type: {
        type: String,
        default: ''
    }
})
const parseDate = computed(() => dayjs(props.curDate).format('YYYY-MM'))
const handleMore = () => {
    uni.navigateTo({
        url: '/bundle/pages/summary-list/index?date=' + props.curDate + '&type=' + props.type
    })
}
</script>
<style scoped></style>
