<template>
	<view class="floating-button" @click="handleClick">
		<slot name="default">
			<tui-icon name="plus" color='#fff'></tui-icon>
		</slot>
	</view>
</template>

<script>
	export default {
		name: "Floating-Button",
		data() {
			return {

			};
		},
		methods: {
			handleClick() {
				// 点击时触发自定义事件
				this.$emit("click");
			},
		}
	}
</script>
<style scss scoped>
	.floating-button {
		position: fixed;
		right: 50rpx;
		bottom: 100rpx;
		width: 100rpx;
		height: 100rpx;
		background-color: #5179ef;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
		color: #ffffff;
		cursor: pointer;
		z-index: 999;
	}
</style>