From a530ec867bf044346c6fe3c359f6b3212c4110dc Mon Sep 17 00:00:00 2001
From: nsk <50975307+niesk@users.noreply.github.com>
Date: Tue, 12 Oct 2021 09:12:10 +0800
Subject: [PATCH] =?UTF-8?q?fix(Loading):=20add=20theme=20prop,=20The=20rep?=
=?UTF-8?q?air=20background=20prop=20does=20not=20tak=E2=80=A6=20(#1271)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix(Loading): add theme prop, The repair background prop does not take effect
* fix(AppLogo): fix title line height
---
src/components/Application/src/AppLogo.vue | 1 +
src/components/Loading/src/Loading.vue | 16 ++++++++++++++--
src/views/demo/comp/loading/index.vue | 10 +++++++++-
3 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/src/components/Application/src/AppLogo.vue b/src/components/Application/src/AppLogo.vue
index 359688cb..86aaf76a 100644
--- a/src/components/Application/src/AppLogo.vue
+++ b/src/components/Application/src/AppLogo.vue
@@ -87,6 +87,7 @@
font-size: 16px;
font-weight: 700;
transition: all 0.5s;
+ line-height: normal;
}
}
diff --git a/src/components/Loading/src/Loading.vue b/src/components/Loading/src/Loading.vue
index 3a7407bc..f626b181 100644
--- a/src/components/Loading/src/Loading.vue
+++ b/src/components/Loading/src/Loading.vue
@@ -1,5 +1,10 @@
-
@@ -35,6 +40,9 @@
background: {
type: String as PropType,
},
+ theme: {
+ type: String as PropType<'dark' | 'light'>,
+ },
},
});
@@ -60,8 +68,12 @@
}
html[data-theme='dark'] {
- .full-loading {
+ .full-loading:not(.light) {
background-color: @modal-mask-bg;
}
}
+
+ .full-loading.dark {
+ background-color: @modal-mask-bg;
+ }
diff --git a/src/views/demo/comp/loading/index.vue b/src/views/demo/comp/loading/index.vue
index 318d7139..351277fd 100644
--- a/src/views/demo/comp/loading/index.vue
+++ b/src/views/demo/comp/loading/index.vue
@@ -6,7 +6,13 @@
全屏 Loading
容器内 Loading
-
+
@@ -37,6 +43,8 @@
const compState = reactive({
absolute: false,
loading: false,
+ theme: 'dark',
+ background: 'rgba(111,111,111,.7)',
tip: '加载中...',
});
const [openFullLoading, closeFullLoading] = useLoading({
--
GitLab