<template>
	<view :class="['content', {'fixed': fixed}]">
		<view @click="handleClick">
			<u-navbar :is-back="false" :is-fixed="false" :background="{ background: 'transparent' }" :border-bottom="false">
				<text class="title-view">{{title}}</text>
			</u-navbar>
		</view>
		<slot></slot>
	</view>
</template>

<script>
	export default {
		props: {
			title: {
				type: String,
				default: '充电桩自营平台'
			},
			fixed: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {

			}
		},
		methods: {
			handleClick() {
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content {
		// height: 100vh;
		background-color: #f4f5f7;
		padding: 0rpx 30rpx 0 30rpx;
		// overflow-y: auto;
		&.fixed {
			height: 100vh;
			display: flex;
			flex-direction: column;
		}

		.title-view {
			color: #333333;
			font-weight: bold;
			font-size: 40rpx;
		}
	}
</style>
