2020-09-28 20:19:10 +08:00
|
|
|
<template>
|
2020-10-11 00:05:29 +08:00
|
|
|
<section class="full-loading" :style="getStyle">
|
2020-09-28 20:19:10 +08:00
|
|
|
<BasicLoading :tip="tip" :size="SizeEnum.DEFAULT" />
|
|
|
|
|
</section>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import type { PropType } from 'vue';
|
|
|
|
|
import { defineComponent, computed } from 'vue';
|
|
|
|
|
import BasicLoading from './BasicLoading.vue';
|
|
|
|
|
|
|
|
|
|
import { SizeEnum } from '/@/enums/sizeEnum';
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
name: 'FullLoading',
|
|
|
|
|
components: { BasicLoading },
|
|
|
|
|
props: {
|
|
|
|
|
tip: {
|
|
|
|
|
type: String as PropType<string>,
|
|
|
|
|
default: '',
|
|
|
|
|
},
|
|
|
|
|
absolute: Boolean as PropType<boolean>,
|
|
|
|
|
},
|
|
|
|
|
setup(props) {
|
|
|
|
|
// 样式前缀
|
|
|
|
|
const getStyle = computed((): any => {
|
|
|
|
|
return props.absolute
|
|
|
|
|
? {
|
|
|
|
|
position: 'absolute',
|
|
|
|
|
left: 0,
|
|
|
|
|
top: 0,
|
|
|
|
|
'z-index': 1,
|
|
|
|
|
}
|
|
|
|
|
: {};
|
|
|
|
|
});
|
|
|
|
|
return { getStyle, SizeEnum };
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
</script>
|
2020-10-11 00:05:29 +08:00
|
|
|
<style lang="less" scoped>
|
|
|
|
|
.full-loading {
|
|
|
|
|
display: flex;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: rgba(255, 255, 255, 0.3);
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
|
|
|
|
</style>
|