<template>
	<view
		class="g-components-loading g_w_all g_h_all g_flex_c"
		:style="{
			'min-height': minHeight ? minHeight + 'rpx' : '0rpx',
			'background-color':bg ? bg : 'auto'
		}"
	>
		<view :class="paddingBottom">
			<view class="g_flex_row_center g_mb_10">
				<u-loading mode="circle" color="#00B666"></u-loading>
			</view>
			<view class="g_fs_14 g_c_9 g_flex_row_center" v-if="text != 'empty'">{{ text }}</view>
		</view>
	</view>
</template>

<script>
/* 自定义loading */
export default {
	props: {
		loading: {
			type: Boolean,
			default: () => {
				return true;
			},
		},
		minHeight: {
			default: () => {
				return 500;
			},
		},
		text: {
			default: () => {
				return "加载中...";
			},
		},
		paddingBottom: { // 微调loading的位置
			default: () => {
				return 0;
			},
		},
		bg:{
			default: () => {
				return 'auto';
			},
		}
	},
};
</script>

<style lang="scss"></style>
