From 758d8056dc3dbc6bf92c298aa3627e66b933b5a0 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期四, 22 五月 2025 13:25:21 +0800 Subject: [PATCH] feat: 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