diff --git a/components.d.ts b/components.d.ts
index 1202f55..8d38c80 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -13,10 +13,7 @@ declare module 'vue' {
export interface GlobalComponents {
ImageViewer: typeof import('./src/components/ImageViewer.vue')['default']
Loading: typeof import('./src/components/Loading.vue')['default']
- Message: typeof import('./src/components/Message.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
- VanButton: typeof import('vant/es')['Button']
- VanDialog: typeof import('vant/es')['Dialog']
}
}
diff --git a/src/components/Loading.vue b/src/components/Loading.vue
index fb58129..b7afc60 100644
--- a/src/components/Loading.vue
+++ b/src/components/Loading.vue
@@ -8,69 +8,74 @@
}"
:style="containerStyle"
>
-
-
-
-
-
+
+
+
-
-
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
-
-
+
+
-
-
- {{ text }}
+
+
+
+
+
+
+
+ {{ text }}
+
@@ -110,7 +115,9 @@ const props = defineProps<{
const containerStyle = computed(() => {
const style: any = {}
if (props.fullscreen) {
- style.backgroundColor = props.background || 'rgba(255, 255, 255, 0.9)'
+ style.background =
+ props.background ||
+ 'radial-gradient(circle at 20% 20%, rgba(255,247,249,0.95), rgba(255,236,240,0.72))'
style.opacity = props.opacity ?? 1
}
return style
@@ -118,8 +125,10 @@ const containerStyle = computed(() => {
// 计算spinner包装器样式
const spinnerWrapperStyle = computed(() => {
+ const color = props.color || '#E8424D'
return {
- color: props.color || '#1890ff'
+ color,
+ '--loading-color': color
}
})
@@ -204,6 +213,13 @@ const textStyle = computed(() => {
\ No newline at end of file
+
+@keyframes pulseGlow {
+ 0% {
+ transform: scale(0.92);
+ opacity: 0.8;
+ }
+ 50% {
+ transform: scale(1);
+ opacity: 1;
+ }
+ 100% {
+ transform: scale(1.05);
+ opacity: 0.9;
+ }
+}
+
+@keyframes float {
+ from {
+ transform: translateY(0);
+ }
+ to {
+ transform: translateY(-12px);
+ }
+}
+
diff --git a/src/components/loading.ts b/src/components/loading.ts
index c63eee6..d22218d 100644
--- a/src/components/loading.ts
+++ b/src/components/loading.ts
@@ -47,11 +47,11 @@ export function showLoading(options: LoadingOptions = {}): LoadingInstance {
// 默认配置
const defaultOptions: LoadingOptions = {
type: 'spinner',
- size: 40,
- color: '#1890ff',
+ size: 42,
+ color: '#E8424D',
fullscreen: true,
text: '',
- background: 'rgba(0, 0, 0, 0.3)',
+ background: 'rgba(255, 241, 243, 0.8)',
opacity: 1,
strokeWidth: 3,
strokeLinecap: 'round'
@@ -171,4 +171,4 @@ export default {
hide: hideLoading,
showWithText: showLoadingWithText,
showInline: showInlineLoading
-}
\ No newline at end of file
+}