<template>
  <el-card class="main-page-card">
    <template #header>
      <div class="flex justify-between">
        <b>{{ title }}</b>
        <router-link custom v-slot="{ navigate }" :to="to">
          <div class="cursor-pointer flex items-center" @click="navigate">
            <b>查看更多</b>
            <icon-ep-d-arrow-right />
          </div>
        </router-link>
      </div>
    </template>
    <slot></slot>
  </el-card>
</template>
<style scoped lang="scss">
.main-page-card {
  --el-card-padding: 15px;
}
</style>
<script setup lang="ts">
defineProps<{
  title: string;
  to: string;
}>();
</script>
