<template>
  <div class="app-total-page" v-if="info.img">
    <div class="app-total-left" :style="{flex: `0 0 ${imgSize}px`,height: `${imgSize}px`}">
      <img :src="info.img" alt=""/>
    </div>
    <div class="app-total-right">
      <ViewStatCard :info="info"/>
    </div>
  </div>
  <ViewStatCard v-else :info="info"/>
</template>

<script setup>
import { ref, computed, onMounted } from 'vue';
import { Icon, Transfer } from '@king-design/vue';
import ViewStatCard from './statCard.vue';
const props = defineProps({
  info: {
    type: Object,
    default: {},
  },
});
const imgSize = computed(()=>{
  return props.info?.imgSize || 56
})
</script>

<style lang="less" scoped>
.app-total-page {
  display: flex;
  flex: 1;
  height: 100%;
}
.app-total-left {
  margin: 0px 16px;
  
  img {
    width: 100%;
    height: 100%;
  }
}

.app-total-right {
  flex: 1;
}
.app-total-title,
.app-total-unit {
  font-size: 12px;
  color: #3c4449;
  margin-top: 27px;
}
.app-total-unit {
  margin-left: 2px;
}
.app-total-num {
  font-size: 30px;
  font-weight: 500;
  color: #3c4449;
}
</style>
