From 590c5e5c3bd9a8bde19dfa20d2a9889ede170e0b Mon Sep 17 00:00:00 2001 From: James-9696 Date: Tue, 21 Oct 2025 01:34:32 -0700 Subject: [PATCH 1/3] fix: modify the saas theme --- .../theme-saas/src/svgs/loading-shadow.svg | 9 +--- packages/theme-saas/src/switch/index.less | 54 ++++++++++++------- packages/vue/src/switch/src/index.ts | 2 +- 3 files changed, 36 insertions(+), 29 deletions(-) diff --git a/packages/theme-saas/src/svgs/loading-shadow.svg b/packages/theme-saas/src/svgs/loading-shadow.svg index 847a81967f..7923d348b7 100644 --- a/packages/theme-saas/src/svgs/loading-shadow.svg +++ b/packages/theme-saas/src/svgs/loading-shadow.svg @@ -1,8 +1 @@ - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/packages/theme-saas/src/switch/index.less b/packages/theme-saas/src/switch/index.less index c7f9d68ad7..b122f07450 100644 --- a/packages/theme-saas/src/switch/index.less +++ b/packages/theme-saas/src/switch/index.less @@ -4,7 +4,7 @@ .@{switch-prefix-cls} { @apply inline-block; - width: 50px; + @apply ~'w-10'; @apply h-5; @apply leading-5; @apply rounded-3xl; @@ -27,32 +27,50 @@ width: 38px; } - &&-checked.disabled, - &.disabled { - @apply cursor-not-allowed; - @apply bg-color-text-disabled; - @apply border-color-text-primary; - } - - &&-checked.disabled { - @apply bg-color-brand-disabled; + &&-checked &__button { + left: calc(100% - 18px); } - &::after { - @apply content-['']; + &__button { @apply w-4; @apply h-4; + @apply flex; + @apply items-center; + @apply justify-center; + border-radius: 50%; + @apply content-['']; + @apply ~'top-0.5'; + @apply ~'left-0.5'; @apply rounded-full; @apply bg-color-bg-1; @apply absolute; - @apply ~'left-0.5'; - @apply ~'translate-y-0.5'; @apply cursor-pointer; transition: left 0.2s ease-in-out, width 0.2s ease-in-out; } - &:not(.disabled)::after { - @apply shadow-xsm; + &&-checked.disabled, + &.disabled { + @apply cursor-not-allowed; + background-color: #dbdbdb; + border-color: #dbdbdb; + } + + &&-checked.disabled { + @apply bg-color-brand-disabled; + } + + &__on-loading { + @apply text-xs; + fill: #b3d6ff; + } + + &__off-loading { + @apply text-xs; + fill: #dbdbdb; + } + + &__text { + width: 46px; } &&-checked { @@ -64,9 +82,5 @@ width: calc(~'100% - 25px'); @apply overflow-hidden; } - - &:after { - left: calc(~'100% - 18px'); - } } } \ No newline at end of file diff --git a/packages/vue/src/switch/src/index.ts b/packages/vue/src/switch/src/index.ts index 3a3eb6ecc7..79a5005d3b 100644 --- a/packages/vue/src/switch/src/index.ts +++ b/packages/vue/src/switch/src/index.ts @@ -33,7 +33,7 @@ export const switchProps = { }, showText: { type: Boolean || undefined, - default: undefined + default: false }, types: { type: String From 93075d82292bfa8bb85111f52fa227d90e0ddac6 Mon Sep 17 00:00:00 2001 From: James-9696 Date: Tue, 28 Oct 2025 19:28:46 -0700 Subject: [PATCH 2/3] fix: update the width --- packages/theme-saas/src/switch/index.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/theme-saas/src/switch/index.less b/packages/theme-saas/src/switch/index.less index b122f07450..28fc3f8a1a 100644 --- a/packages/theme-saas/src/switch/index.less +++ b/packages/theme-saas/src/switch/index.less @@ -4,7 +4,7 @@ .@{switch-prefix-cls} { @apply inline-block; - @apply ~'w-10'; + width: 50px; @apply h-5; @apply leading-5; @apply rounded-3xl; @@ -70,7 +70,7 @@ } &__text { - width: 46px; + width: 50px; } &&-checked { From 4cf66085c92872f3ade5d38e8c6a7e5f136f4099 Mon Sep 17 00:00:00 2001 From: James-9696 Date: Tue, 28 Oct 2025 20:58:57 -0700 Subject: [PATCH 3/3] fix: modify reviews --- packages/theme-saas/src/svgs/loading-shadow.svg | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/theme-saas/src/svgs/loading-shadow.svg b/packages/theme-saas/src/svgs/loading-shadow.svg index 7923d348b7..847a81967f 100644 --- a/packages/theme-saas/src/svgs/loading-shadow.svg +++ b/packages/theme-saas/src/svgs/loading-shadow.svg @@ -1 +1,8 @@ - \ No newline at end of file + + + + + \ No newline at end of file