<template>
|
<div
|
class="block-botttom"
|
:style="{
|
'--backgroundColor': props.backgroundColor,
|
}"
|
@click="props.onClick"
|
>
|
<img :src="icon" alt="" class="icon" />
|
<span class="text">{{ text }}</span>
|
</div>
|
</template>
|
|
<script lang="ts" setup name="BlockBotttom">
|
interface Props {
|
icon: string; // 图标
|
text: string; // 文本
|
backgroundColor: string; // 背景颜色
|
onClick: () => void; // 点击事件
|
}
|
const props = defineProps<Props>();
|
</script>
|
|
<style lang="less" scoped>
|
.block-botttom {
|
width: 18px;
|
height: 18px;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
justify-content: center;
|
background: var(--backgroundColor, #70a3dd);
|
border-radius: 2px;
|
.icon {
|
margin-bottom: 2px;
|
width: 6px;
|
height: 6px;
|
}
|
.text {
|
font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
|
font-weight: 500;
|
font-size: 3px;
|
color: #ffffff;
|
text-align: left;
|
font-style: normal;
|
}
|
}
|
</style>
|