<template>
	<view>
		{{dateFormat}}
	</view>
</template>

<script setup>
import { computed } from 'vue'
import dayjs from 'dayjs'

const props = defineProps({
	date: [String, Object],
	format: {
		type: String,
		default: 'YYYY-MM-DD'
	}
})
const emits = defineEmits(['click'])

const dateFormat = computed(() => dayjs(props.date).format(props.format))

const handleClick = () => {
	emits('click')
}
</script>

<style>

</style>
