From 30a622b1e06bfc13b5be175c00c8fce1d2795065 Mon Sep 17 00:00:00 2001 From: James <72028410+James-9696@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:41:36 +0800 Subject: [PATCH] fix(transfer ): [transfer] update transfer xdesign (#1419) * fix: update transfer xdesign * fix: update code review --- packages/theme/src/transfer/index.less | 11 +++++++++-- packages/theme/src/transfer/smb-theme.js | 18 +++++++++++++++--- packages/theme/src/transfer/vars.less | 12 ++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/packages/theme/src/transfer/index.less b/packages/theme/src/transfer/index.less index 535b02029..cf65b3eac 100644 --- a/packages/theme/src/transfer/index.less +++ b/packages/theme/src/transfer/index.less @@ -61,6 +61,12 @@ margin-right: var(--ti-transfer-buttons-margin-right); margin-top: var(--ti-transfer-buttons-margin-top); margin-bottom: var(--ti-transfer-buttons-margin-bottom); + background: var(--ti-transfer-svg-background); + border-color: var(--ti-transfer-btn-border-color); + + &:hover { + background: var(--ti-transfer-panel-btn-hover-bg-color); + } } } @@ -72,8 +78,8 @@ margin-bottom: var(--ti-transfer-button-margin-bottom); border-color: var(--ti-transfer-button-bg-color); background-color: var(--ti-transfer-button-bg-color); - min-width: 30px; - min-height: 30px; + width: var(--ti-transfer-button-width); + height: var(--ti-transfer-button-height); border-radius: var(--ti-transfer-button-border-radius); line-height: normal; padding-left: var(--ti-transfer-button-padding-left); @@ -87,6 +93,7 @@ } &.@{button-prefix-cls}:not(.is-circle) .@{svg-prefix-cls} { + font-size: var(--ti-transfer-svg-font-size); margin-right: 0; } diff --git a/packages/theme/src/transfer/smb-theme.js b/packages/theme/src/transfer/smb-theme.js index 8f92c4892..b096c0938 100644 --- a/packages/theme/src/transfer/smb-theme.js +++ b/packages/theme/src/transfer/smb-theme.js @@ -1,9 +1,21 @@ export const tinyTransferSmbTheme = { // transfer-SMB主题 'ti-transfer-panel-item-text-color': 'var(--ti-common-color-info-normal)', - 'ti-transfer-button-bg-color': 'var(--ti-common-color-prompt)', 'ti-transfer-font-size': 'var(--ti-common-font-size-1)', - 'ti-transfer-button-border-radius': 'var(--ti-common-space-6)', 'ti-transfer-panel-border-color': 'var(--ti-common-color-line-disabled)', - 'ti-transfer-panel-item-hover-bg-color': 'var(--ti-common-color-hover-background)' + 'ti-transfer-panel-item-hover-bg-color': 'var(ti-common-color-bg-normal, #f5f5f5)', + 'ti-transfer-header-height': '38px', + 'ti-transfer-panel-item-height': 'var(--ti-common-size-8x)', + 'ti-transfer-button-bg-color': '#1476ff', + 'ti-transfer-button-height': 'var(--ti-common-size-4x)', + 'ti-transfer-button-width': 'var(--ti-common-size-4x)', + 'ti-transfer-button-padding-left': '2px', + 'ti-transfer-button-padding-right': '2px', + 'ti-transfer-button-padding-top': '2px', + 'ti-transfer-button-padding-bottom': '2px', + 'ti-transfer-button-border-radius': 'var(--ti-common-size-base)', + 'ti-transfer-svg-font-size': '10px', + 'ti-transfer-svg-background': '#1476ff', + 'ti-transfer-btn-border-color': '#1476ff', + 'ti-transfer-panel-btn-hover-bg-color': '#409eff' } diff --git a/packages/theme/src/transfer/vars.less b/packages/theme/src/transfer/vars.less index c8487ed6c..d5fe49289 100644 --- a/packages/theme/src/transfer/vars.less +++ b/packages/theme/src/transfer/vars.less @@ -237,4 +237,16 @@ --ti-transfer-pager-padding-bottom: var(--ti-common-space-10, 10px); // 多选框左侧内边距 --ti-transfer-checkbox-label-padding-left: var(--ti-common-space-2x, 8px); + // 穿梭按钮宽度 + --ti-transfer-button-width: 30px; + // 穿梭按钮高度 + --ti-transfer-button-height: 30px; + // 穿梭箭头大小 + --ti-transfer-svg-font-size: 14px; + // 穿梭框背景色 + --ti-transfer-svg-background: #191919; + // 穿梭按钮边框色 + --ti-transfer-btn-border-color: #595959; + // 穿梭按钮悬浮背景色 + --ti-transfer-panel-btn-hover-bg-color: #595959; }