From 41855908a810b82e0ce030eceb9a5f8dd2dbbd10 Mon Sep 17 00:00:00 2001
From: Tevin <tingquanren@163.com>
Date: Thu, 16 Nov 2023 15:55:43 +0800
Subject: [PATCH] 添加等待中组件

---
 layout/waiting/cWaiting.scss |   26 +++++++++++++
 layout/waiting/CWaiting.vue  |   54 +++++++++++++++++++++++++++
 layout/waiting/index.js      |   10 +++++
 3 files changed, 90 insertions(+), 0 deletions(-)

diff --git a/layout/waiting/CWaiting.vue b/layout/waiting/CWaiting.vue
new file mode 100644
index 0000000..fe7c3de
--- /dev/null
+++ b/layout/waiting/CWaiting.vue
@@ -0,0 +1,54 @@
+/**
+ * CWaiting - 等待中
+ * @author Tevin
+ */
+
+<template>
+    <AtModal
+        class="c-waiting"
+        v-show="isOpened"
+        :isOpened="isOpened"
+        :closeOnClickOverlay="false"
+    >
+        <AtModalContent>
+            <AtActivityIndicator />
+            <view
+                class="title"
+                v-if="title"
+            >{{title}}</view>
+            <view
+                v-if="sub"
+                class="sub m-text-warning"
+            >{{sub}}</view>
+        </AtModalContent>
+    </AtModal>
+</template>
+
+<script>
+import Taro from '@tarojs/taro';
+import { AtModal, AtModalContent, AtActivityIndicator } from 'taro-ui-vue';
+import './cWaiting.scss';
+
+export default {
+    name: 'CWaiting',
+    components: {
+        AtModal,
+        AtModalContent,
+        AtActivityIndicator,
+    },
+    props: {
+        // 是否显示
+        isOpened: Boolean,
+        // 标题
+        title: String,
+        // 次标题
+        sub: String,
+        // 次标题颜色类型
+        subType: {
+            type: String,
+            default: 'warning',
+        },
+    },
+    methods: {},
+};
+</script>
\ No newline at end of file
diff --git a/layout/waiting/cWaiting.scss b/layout/waiting/cWaiting.scss
new file mode 100644
index 0000000..1c8f209
--- /dev/null
+++ b/layout/waiting/cWaiting.scss
@@ -0,0 +1,26 @@
+/**
+ * CWaiting
+ * @author Tevin
+ */
+
+@import "../../common/sassMixin";
+
+.c-waiting {
+    text-align: center;
+    .at-activity-indicator__body {
+        margin: 0 auto;
+        height: 90px;
+        .at-loading,
+        .at-loading__ring {
+            width: 80px;
+            height: 80px;
+        }
+    }
+    .title {
+        font-size: 38px;
+        padding: 6px 0 0;
+    }
+    .sub {
+        font-size: 34px;
+    }
+}
\ No newline at end of file
diff --git a/layout/waiting/index.js b/layout/waiting/index.js
new file mode 100644
index 0000000..00c3fc6
--- /dev/null
+++ b/layout/waiting/index.js
@@ -0,0 +1,10 @@
+/**
+ * layout
+ * @author Tevin
+ */
+
+import CWaiting from '@components/layout/waiting/CWaiting.vue';
+
+export {
+    CWaiting,
+}
\ No newline at end of file

--
Gitblit v1.9.1