From 8a6a7885e1da6c93db4034aa4fad546a71dc3c05 Mon Sep 17 00:00:00 2001 From: lllllllqw <465633856@qq.com> Date: Mon, 30 Sep 2024 10:13:27 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(Select):=20loading=20=E9=85=8D=E5=90=88?= =?UTF-8?q?=E8=A7=A6=E5=BA=95=E4=BA=8B=E4=BB=B6=20onScrollToBottom=20?= =?UTF-8?q?=E4=B8=80=E8=B5=B7=E4=BD=BF=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- style/web/components/select/_index.less | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/style/web/components/select/_index.less b/style/web/components/select/_index.less index 971541976b..093863b5c0 100644 --- a/style/web/components/select/_index.less +++ b/style/web/components/select/_index.less @@ -27,6 +27,8 @@ } &-inner { + min-height: @select-height-default; + // 嵌套无需 padding .@{prefix}-select__list .@{prefix}-select__list { padding: 0; @@ -38,6 +40,8 @@ } &--size-s { + min-height: @select-height-s; + .@{prefix}-select__list, .@{prefix}-tree { padding: @select-dropdown-padding-s; @@ -45,6 +49,8 @@ } &--size-l { + min-height: @select-height-l; + .@{prefix}-select__list, .@{prefix}-tree { padding: @select-dropdown-padding-l; @@ -81,16 +87,29 @@ // loading tips .@{prefix}-select__loading-tips.@{prefix}-size-s { + min-height: @select-height-s; line-height: @select-height-s; } .@{prefix}-select__loading-tips { - text-align: center; + position: fixed; + top: var(--td-comp-margin-s); + left: 0; + bottom: var(--td-comp-margin-s); + right: 0; + display: flex; + align-items: center; + justify-content: center; + background-color: var(--td-bg-color-container); + border-radius: var(--td-radius-medium); + min-height: @select-height-default; line-height: @select-height-default; color: @select-color-empty; + z-index: 1000; } .@{prefix}-select__loading-tips.@{prefix}-size-l { + min-height: @select-height-l; line-height: @select-height-l; } From 1ee617f8b917437e8e1d6931aacd973ae4fe639c Mon Sep 17 00:00:00 2001 From: lllllllqw <465633856@qq.com> Date: Mon, 30 Sep 2024 21:28:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(Select):=20loading=20=E9=85=8D=E5=90=88?= =?UTF-8?q?=E8=A7=A6=E5=BA=95=E4=BA=8B=E4=BB=B6=20onScrollToBottom=20?= =?UTF-8?q?=E4=B8=80=E8=B5=B7=E4=BD=BF=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- style/web/components/select/_index.less | 8 ++++---- style/web/components/select/_var.less | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/style/web/components/select/_index.less b/style/web/components/select/_index.less index 093863b5c0..3456e414cc 100644 --- a/style/web/components/select/_index.less +++ b/style/web/components/select/_index.less @@ -93,15 +93,15 @@ .@{prefix}-select__loading-tips { position: fixed; - top: var(--td-comp-margin-s); + top: @select-loading-tips-padding; left: 0; - bottom: var(--td-comp-margin-s); + bottom: @select-loading-tips-padding; right: 0; display: flex; align-items: center; justify-content: center; - background-color: var(--td-bg-color-container); - border-radius: var(--td-radius-medium); + background-color: @select-loading-tips-bg-color; + border-radius: @select-border-radius; min-height: @select-height-default; line-height: @select-height-default; color: @select-color-empty; diff --git a/style/web/components/select/_var.less b/style/web/components/select/_var.less index c031c50c5a..89344532c1 100644 --- a/style/web/components/select/_var.less +++ b/style/web/components/select/_var.less @@ -22,6 +22,7 @@ @select-option-checkbox-label-color-hover: inherit; @select-option-checkbox-input-color-hover: @brand-color; @select-right-icon-hover: @brand-color; +@select-loading-tips-bg-color: @bg-color-container; // 尺寸 @select-height-s: @comp-size-xs; @@ -61,3 +62,4 @@ @select-dropdown-margin: @comp-paddingTB-s 0; @select-options-margin-top: @comp-paddingTB-xxs; @select-empty-padding: 0 @comp-paddingLR-s; +@select-loading-tips-padding: @comp-paddingTB-s;