| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <template>
- <view class="common_header">
- <view class="header_left" @click="handleBack">
- <uni-icons type="back" size="24" color="#333333"></uni-icons>
- </view>
- <text class="header_title">{{ title }}</text>
- <view class="header_right">
- <slot name="right"></slot>
- </view>
- </view>
- </template>
- <script setup>
- const props = defineProps({
- title: {
- type: String,
- default: ''
- }
- });
- const emit = defineEmits(['back']);
- const handleBack = () => {
- emit('back');
- };
- </script>
- <style lang="scss" scoped>
- .common_header {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- z-index: 100;
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 96rpx;
- padding: 0 24rpx;
- background-color: #FFFFFF;
- border-bottom: 2rpx solid #F3F3F3;
- .header_left {
- width: 48rpx;
- }
- .header_title {
- flex: 1;
- text-align: center;
- font-weight: 500;
- font-size: 32rpx;
- color: #333333;
- }
- .header_right {
- width: 48rpx;
- }
- }
- </style>
|