From add9b3bb61fcc337b02c15e7973967d670e7d3be Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 21 五月 2025 17:17:28 +0800 Subject: [PATCH] Merge branch 'dev-ui' of http://120.26.58.240:8888/r/LifePaymentFront into dev-ui --- apps/h5/src/components/Layout/LoadingLayout.vue | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/apps/h5/src/components/Layout/LoadingLayout.vue b/apps/h5/src/components/Layout/LoadingLayout.vue new file mode 100644 index 0000000..846aa4f --- /dev/null +++ b/apps/h5/src/components/Layout/LoadingLayout.vue @@ -0,0 +1,53 @@ +<template> + <div class="loading-layout-wrapper"> + <div class="spinner-wrapper" v-if="props.loading"> + <div class="el-loading-spinner"> + <el-icon class="is-loading"> + <Loading /> + </el-icon> + <p class="el-loading-text">鎷煎懡鍔犺浇涓�</p> + </div> + </div> + <template v-else> + <div v-if="props.error">鍑洪敊浜�</div> + <template v-else> + <slot></slot> + </template> + </template> + </div> +</template> + +<script setup lang="ts"> +defineOptions({ + name: 'LoadingLayout', +}); + +type Props = { + loading?: boolean; + error?: boolean; +}; + +const props = withDefaults(defineProps<Props>(), { + loading: false, + error: false, +}); +</script> + +<style lang="scss" scoped> +.loading-layout-wrapper { + position: relative; + width: 100%; + height: 100%; +} + +.spinner-wrapper { + min-height: calc(100vh - 80px); + // position: relative; +} + +.hasTagsView { + .spinner-wrapper { + min-height: calc(100vh - 124px); + } +} +</style> -- Gitblit v1.9.1