<template>
	<CtTable
    class="mt-3"
    :items="items"
    :headers="headers"
    :loading="false"
    :elevation="0"
    :isTools="false"
    :showPage="true"
    :showSelect="false"
		:page-info="queryParams"
    itemKey="id"
  >
    <template #actions="{ item }">
      <v-btn color="primary" @click.stop="handleSelectAddress(item)" variant="text">选择收货地址</v-btn>
    </template>
  </CtTable>
</template>

<script setup>
defineOptions({ name: 'mall-user-prize-index' })
import { ref } from 'vue'

const queryParams = ref({
	pageNo: 1,
	pageSize: 10,
})
const items = ref([
	{
		lotteryName: '抽奖活动1',
		name: '奖品1',
		address: '收货地址1',
		phone: '联系电话1',
	},
	{
		lotteryName: '抽奖活动2',
		name: '奖品2',
		address: '收货地址2',
		phone: '联系电话2',
	}
])
const headers = [
  { title: '活动名称', key: 'lotteryName', sortable: false },
  { title: '奖品信息', key: 'name', sortable: false },
  { title: '收货地址', key: 'address', sortable: false },
  { title: '联系电话', key: 'phone', sortable: false },
  { title: '快递信息', key: 'deliveryInfo', sortable: false },
  { title: '操作', key: 'actions', sortable: false }
]

const handleSelectAddress = (item) => {
	console.log(item, 'select')
}
</script>

<style scoped lang="scss">

</style>
