<template>
  <div>
    <template v-if="finalTemplate === 'card'">
      <a-card :bordered="false" class="x-page-row-template-card">
        <slot></slot>
      </a-card>
    </template>
    <template v-else>
      <div class="simple-template-card">
        <slot></slot>
      </div>
    </template>
  </div>
</template>

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

// 定义组件属性
const props = defineProps({
  template: {
    type: String,
    default: 'card'
  }
})

// 计算最终使用的模板类型
const finalTemplate = computed(() => {
  return props.template || 'card'
})
</script>

<style scoped lang="less">
.x-page-row-template-card {
  border-radius: 8px;
}
</style>
