<template>
  <el-row style="margin-top: 30px;margin-bottom: 16px;">
    <el-col :span="12" style="font-weight: 500;font-size: 14px;color: #333333;line-height: 18px;">
      {{ props.title }}
    </el-col>
    <el-col :span="12" style="text-align: right">
      <slot>
        <a @click="emit('click')" style="color: #3067ef; cursor: pointer;">
          <el-icon v-if="icon === 'refresh'" style="position: relative; top: 2px"><RefreshRight /></el-icon>
          {{ props.buttonText }}
        </a>
      </slot>
    </el-col>
  </el-row>
</template>
<script setup lang="ts">

import { RefreshRight } from '@element-plus/icons-vue'

interface Props {
  title: string
  buttonText: string
  icon?: string
}
const props = withDefaults(defineProps<Props>(), {})

const emit = defineEmits(['click'])
</script>
<style scoped lang="scss">

</style>
