<script>
export default {
  name: "BasicTotal",
  props: {
    number: {
      type: String,
      default: "",
    },
    label: {
      type: String,
      default: "",
    },
    unit: {
      type: String,
      default: "",
    },
  },
};
</script>

<template>
  <div class="layer">
    <slot name="label" v-if="$slots.label"></slot>
    <span v-else>
      {{ label }}
    </span>

    <span>
      <span class="num">
        <linear-text :text="number" fontSize="16px"></linear-text> </span
      >{{ unit }}
    </span>
  </div>
</template>

<style scoped lang="less">
// 渐变色
.layer {
  display: flex;
  align-items: center;
  height: 31px;
  background: rgba(0, 213, 255, 0.13);
  line-height: 31px;
  color: #fff;
  padding: 3px 5px;
  justify-content: space-between;
}
// 渐变
.num {
  display: inline-block;
  margin: 0 8px;
  background: rgba(0, 213, 255, 0.33);
  padding: 0px 5px;
  width: 51px;
  text-align: center;
  border: 1px solid rgb(0, 106, 255, 0.54);
}
</style>
