hookehuyr

fix 新增样式类型判断

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