<template>
  <span class="lyf-ui-text" :class="[family]">
    <b v-if="unit">{{ unit }}</b>
    <slot></slot>
  </span>
</template>

<script>
export default {
  name: 'LyfText',
  props: {
    // 字体 normal:普通字体，number：金额、数字特殊字体
    family: {
      type: String,
      default: 'normal'
    },
    // 当用于金额时，前面的货币类型。￥ $
    unit: {
      type: String,
      default: ''
    }
  }
}
</script>

<style scoped>
.lyf-ui-text {
  display: flex;
  align-items: center;
}

.lyf-ui-text.number {
  font-family: 'number';
}

.lyf-ui-text b {
  transform: scale(0.8);
}
</style>