<template>
	<u-button 
		@click="click"
		:type="type"
		:size="size"
		:custom-style="{
			borderRadius: 0
		}"
		style="border-radius: 0;"
		:style="{
			width: width,
			fontSize: fontSize,
			position: position,
			bottom: bottom,
			left: left
		}">
		{{ text }}
	</u-button>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		methods:{
			click() {
				if(this.customClick) {
					this.$emit('click')
				} else {
					this.$utils.openReLaunch('/pages/index/index')
				}
			}
		},
		props: {
			// 自定义点击事件
			customClick: {
				type: Boolean,
				default: false
			},
			text: {
				type: String,
				default: '返回首页'
			},
			size: {
				type: String,
				default: 'default'
			},
			type: {
				type: String,
				default: 'primary'
			},
			width: {
				type: String,
				default: '100%'
			},
			height: {
				type: String,
				default: '60rpx'
			},
			fontSize: {
				type: String,
				default: '24rpx'
			},
			position: {
				type: String,
				default: 'fixed'
			},
			bottom: {
				type: String,
				default: '0'
			},
			left: {
				type: String,
				default: '0'
			}
		}
	}
</script>

<style lang="scss" scoped>
	.u-btn {
	}
</style>
