2025-03-27 15:38:21 +08:00
|
|
|
<script setup>
|
2025-05-12 19:45:27 +08:00
|
|
|
const {active} = defineProps({
|
|
|
|
|
active: {
|
|
|
|
|
type: Boolean,
|
|
|
|
|
default: false,
|
|
|
|
|
}
|
|
|
|
|
});
|
2025-03-27 15:38:21 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-05-12 19:45:27 +08:00
|
|
|
<view :class="['!py-[14rpx] !px-[24rpx] text', active ? 'active' : '']">
|
2025-03-27 15:38:21 +08:00
|
|
|
<slot></slot>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.text {
|
|
|
|
|
color: rgb(29, 33, 41);
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
line-height: 140%;
|
|
|
|
|
letter-spacing: 0;
|
|
|
|
|
text-align: left;
|
2025-05-12 19:45:27 +08:00
|
|
|
background-color: #fff;
|
|
|
|
|
transition: 500ms;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.active {
|
|
|
|
|
background-color: rgba(106, 161, 255, 0.2);
|
2025-03-27 15:38:21 +08:00
|
|
|
}
|
|
|
|
|
</style>
|