index.vue 844 Bytes
<!--
 * @Date: 2022-06-25 03:29:05
 * @LastEditors: hookehuyr hookehuyr@gmail.com
 * @LastEditTime: 2022-06-25 15:50:08
 * @FilePath: /tswj/src/components/FlowerIcon/index.vue
 * @Description: 文件描述
-->
<template>
  <div :class="[type === 'center' ? 'global-center' : 'flower']">
    <van-icon :name="icon_flower" color="#c5c5c5" size="1.25rem" :style="{ verticalAlign: align }" />
    <span :style="{ color, fontSize }">&nbsp;{{ qty }}</span>
  </div>
</template>

<script setup>
import { icon_flower } from '@/utils/generateIcons.js'

const props = defineProps({
  qty: {
    type: Number,
    default: 0
  },
  color: String,
  align: String,
  type: String,
  fontSize: String
})
</script>

<style lang="less" scoped>
.flower {
  text-align: center; 
  position: absolute; 
  top: 40%; 
  right: 0.5rem;
  color: #713610;
}
</style>