From 314dcacdeecec4dff192b78bad5124b1b29a453d Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 20 二月 2025 15:07:36 +0800
Subject: [PATCH] fix: 页面

---
 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