1234567891011121314151617181920212223242526272829303132333435363738 |
- <template>
- <view class="header" v-if="showTitle">
- <view class="line" />
- {{ title }}
- </view>
- </template>
- <script setup>
- import { defineProps, onMounted } from 'vue';
- const props = defineProps({
- title: {
- type: String,
- default: '',
- },
- showTitle: {
- type: Boolean,
- default: true,
- },
- });
- </script>
- <style scoped lang="less">
- .header {
- padding: 24rpx 0;
- color: #333;
- font-size: 16px;
- display: flex;
- align-items: center;
- font-weight: bold;
- .line {
- width: 4px;
- height: 20px;
- background: linear-gradient(to bottom, #f89c33, #f86834);
- margin-right: 16rpx;
- }
- }
- </style>
|