<template>
  <span @click="handleClick">
    <slot></slot>
  </span>
</template>
<script setup lang="ts">
import { useActivityStore } from '@/stores/activity'
import { RewardButtonEnum } from '@/constants'

const { pageKey } = defineProps<{
  pageKey: RewardButtonEnum
}>()
const activityStore = useActivityStore()
// 调用接口让他跳出动画
const handleClick = () => {
  console.log('点击了')
  activityStore.triggerPageReward(pageKey)
}
</script>
