<script setup lang="ts" name="IconTitle">
import { computed, onMounted } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()

const emit = defineEmits(['back'])

const props = withDefaults(defineProps<{
  icon?: string
  title?: string
}>(), {
  icon: ''
})
</script>

<template>
  <div class="pageTitle">
    <div class="left">
      <img class="icon" :src="props.icon" alt="">
      <span>{{ props.title }}</span>
    </div>
    <div>
      <slot />
    </div>
  </div>
</template>

<style lang="scss" scoped>
.pageTitle {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0px;
  line-height: 22px;
  color: rgba(53, 64, 79, 1);
  .left{
    display: flex;
    align-items: center;
  }

  .icon {
    margin-right: 6px;
    width: 16px;
    height: 16px;
  }
}
</style>
