<template>
	<div class="custom-header">
		<image v-show="back" @click="goBack()" class="header-left" src="../static/image/icon-back.png">
		</image>
		<div :style="back?'margin-right: 30px;':''" class="header-title">
			{{ title }}
		</div>
		<div class="header-right">
		</div>
	</div>
</template>
<script>
	export default {
		props: {
			title: {
				type: String,
				default: '',
			},
			back: {
				type: Boolean,
				default: true,
			},
		},
		// 其他配置和逻辑
		methods: {
			goBack() {
				window.history.back(); // 返回上一级页面
			},
		},
	}
</script>
<style scoped>
	.custom-header {
		background: #FFFFFF;
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		z-index: 999;
		height: 45px;
	}

	.header-left {
		width: 35px;
		height: 35px;
	}

	.header-title {
		text-align: center;
		width: 100%;
		font-size: 32rpx;
		font-weight: bold;
		position: relative;
	}

	/* 其他样式 */
</style>
