index.vue
844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<!--
* @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 }"> {{ 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>