<template>
	<view class="return-box"
		:style="{'left': `calc(100vw - ${tophight.right}px)`,top: tophight.top + 'px',height:tophight.height+'px',width:tophight.width/2+'px'}">
		<m-icon type="arrow-right" class="return" @click='returnPage'></m-icon>
	</view>

</template>

<script>
	export default {
		name: "m-return",
		data: () => ({
			tophight: uni.getMenuButtonBoundingClientRect(),
		}),
		methods: {
			returnPage() {
				wx.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss">
	.return-box {
		position: fixed;
		display: flex;
		justify-content: center;
		align-items: center;

		.return {
			color: #FFFFFF;
			transform: rotate(180deg);
		}
	}
</style>
