<template>
	<u-popup :show="show" 
		:mode="mode"
		:round="round"
		:bgColor="bgColor"
		:safeAreaInsetBottom="mode !== 'center'"
		@open="open"
		@close="close">
		<slot></slot>
	</u-popup>
</template>

<script>
export default {
	name: "",
	props: {
		mode: {
			type: String,
			default: 'bottom',
		},
		round: {
			type: [Number, String],
			default: '0',
		},
		bgColor: {
			type: String,
			default: '#fff',
		},
	},
	data() {
		return {
			show: false,
		};
	},
	mounted() {
		
	},
	methods: {
		open() {
			this.show = true;
			this.$emit('open');
		},
		close() {
			this.show = false;
			this.$emit('close');
		},
	}
}
</script>

<style lang="scss" scoped>
.u-popup {
	flex: initial;
}
::v-deep .u-popup {
	flex: initial;
}
</style>