hookehuyr

fix 新增样式类型判断

<!--
* @Date: 2022-06-25 03:29:05
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-25 10:26:12
* @LastEditTime: 2022-06-25 11:04:16
* @FilePath: /tswj/src/components/FlowerIcon/index.vue
* @Description: 文件描述
-->
<template>
<div class="flower" @click="goTo">
<div v-if="type === 'center'" class="global-center" style="color: #222222;" @click="goTo">
<van-icon :name="icon_flower" color="#c5c5c5" size="1.25rem" :style="{ verticalAlign: align }" />
<span :style="{ color }">&nbsp;{{ qty }}</span>
<span :style="{ color, fontSize }">&nbsp;{{ qty }}</span>
</div>
<!-- <div class="global-center" style="color: #222222;" @click="goTo">
<div v-if="type === 'right'" class="flower" @click="goTo">
<van-icon :name="icon_flower" color="#c5c5c5" size="1.25rem" :style="{ verticalAlign: align }" />
<span>&nbsp;{{ qty }}</span>
</div> -->
<span :style="{ color, fontSize }">&nbsp;{{ qty }}</span>
</div>
</template>
<script setup>
import { icon_flower } from '@/utils/generateIcons.js'
const props = defineProps({
qty: Number,
qty: {
type: Number,
default: 0
},
color: String,
align: String,
type: String,
fontSize: String
})
const emit = defineEmits(['on-click']);
const goTo = () => {
......
......@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-30 10:20:34
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-25 10:17:55
* @LastEditTime: 2022-06-25 11:07:29
* @FilePath: /tswj/src/components/RankingItem/index.vue
-->
<template>
......@@ -34,7 +34,7 @@
</div>
</van-col>
<van-col>
<flower-icon :qty="rankInfo.qty" align="bottom" @on-click="onFlowerClick" />
<flower-icon type="right" :qty="rankInfo.qty" align="bottom" @on-click="onFlowerClick" />
</van-col>
</van-row>
</div>
......
......@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-30 13:51:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-25 10:28:13
* @LastEditTime: 2022-06-25 11:07:55
* @FilePath: /tswj/src/views/client/donateList.vue
* @Description: 幼儿园捐赠人捐赠金额排行榜
-->
......@@ -29,7 +29,7 @@
</div>
</van-col>
<van-col>
<flower-icon :qty="kgInfo.kg_total" align="bottom" />
<flower-icon type="center" :qty="kgInfo.kg_total" align="bottom" font-size="1.25rem" />
</van-col>
</van-row>
</div>
......@@ -48,7 +48,7 @@
</div>
</van-col>
<van-col span="6" style="color: #222222; text-align: right; font-size: 1rem;">
<flower-icon :qty="item.qty" align="top" color="#222222" />
<flower-icon type="right" :qty="item.qty" align="top" color="#222222" />
</van-col>
</van-row>
</div>
......
......@@ -2,7 +2,7 @@
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-30 13:51:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-25 10:30:13
* @LastEditTime: 2022-06-25 11:07:44
* @FilePath: /tswj/src/views/client/rankList.vue
* @Description: 幼儿园儿童捐赠金额排行榜
-->
......@@ -27,7 +27,7 @@
</div>
</van-col>
<van-col>
<flower-icon :qty="kgInfo.kg_total" align="bottom" />
<flower-icon type="center" :qty="kgInfo.kg_total" align="bottom" font-size="1.25rem" />
</van-col>
</van-row>
</div>
......@@ -51,7 +51,7 @@
</div>
</van-col>
<van-col span="4" style="text-align: right; font-size: 1rem;">
<flower-icon :qty="rank.qty" align="top" color="#222222" />
<flower-icon type="right" :qty="rank.qty" align="top" color="#222222" />
</van-col>
</van-row>
</div>
......