72 lines
1.2 KiB
Plaintext
72 lines
1.2 KiB
Plaintext
<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>
|