Files
ShaFaFanXin/前端/components/section-header/section-header.uvue
2026-01-27 18:06:04 +08:00

72 lines
1.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="section-header">
<view class="section-left">
<view class="section-line"></view>
<text class="section-title">{{ title }}</text>
</view>
<view class="section-right" v-if="showMore" @click="handleMore">
<text class="section-more">查看更多</text>
<text class="section-arrow"></text>
</view>
</view>
</template>
<script setup lang="uts">
const props = defineProps<{
title : string
showMore ?: boolean
}>()
const emit = defineEmits<{
(e : 'more') : void
}>()
const handleMore = () => {
emit('more')
}
</script>
<style lang="scss">
.section-header {
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 32rpx 0 24rpx 0;
}
.section-left {
flex-direction: row;
align-items: center;
}
.section-line {
width: 8rpx;
height: 36rpx;
background-color: #D4A574;
border-radius: 4rpx;
margin-right: 16rpx;
}
.section-title {
font-size: 34rpx;
font-weight: 600;
color: #333333;
}
.section-right {
flex-direction: row;
align-items: center;
}
.section-more {
font-size: 26rpx;
color: #909399;
}
.section-arrow {
font-size: 32rpx;
color: #909399;
margin-left: 8rpx;
}
</style>