From 65d988ce5efe604c889bad1d93edd91203621ddf Mon Sep 17 00:00:00 2001 From: You-Hw-Y <1664677472@qq.com> Date: Mon, 9 Sep 2024 00:15:04 -0700 Subject: [PATCH] feat(popconfirm): [popconfirm] Adapting to the SMB theme --- packages/design/smb/src/popconfirm/index.ts | 4 ++-- packages/theme/src/popconfirm/index.less | 3 ++- packages/theme/src/popconfirm/smb-theme.js | 3 ++- packages/theme/src/popconfirm/vars.less | 3 ++- packages/vue/src/popconfirm/src/index.ts | 2 +- packages/vue/src/popconfirm/src/pc.vue | 4 ++-- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/design/smb/src/popconfirm/index.ts b/packages/design/smb/src/popconfirm/index.ts index 3e43108161..664bbe6f00 100644 --- a/packages/design/smb/src/popconfirm/index.ts +++ b/packages/design/smb/src/popconfirm/index.ts @@ -1,8 +1,8 @@ -import { iconWarningTriangle, iconPromptExclamation } from '@opentiny/vue-icon' +import { iconWarningTriangle, iconHelp } from '@opentiny/vue-icon' export default { icons: { warning: iconWarningTriangle(), - info: iconPromptExclamation() + info: iconHelp() } } diff --git a/packages/theme/src/popconfirm/index.less b/packages/theme/src/popconfirm/index.less index 02829e16cc..b430c3e31e 100644 --- a/packages/theme/src/popconfirm/index.less +++ b/packages/theme/src/popconfirm/index.less @@ -52,6 +52,7 @@ height: var(--ti-popconfirm-popover-icon-width); width: var(--ti-popconfirm-popover-icon-width); margin-right: var(--ti-popconfirm-popover-icon-margin-right); + margin-bottom: var(--ti-popconfirm-popover-icon-margin-bottom); } &__title { @@ -88,7 +89,7 @@ } &--warning { - fill: #fdc000; + fill: #FF8800; } &--success { diff --git a/packages/theme/src/popconfirm/smb-theme.js b/packages/theme/src/popconfirm/smb-theme.js index 2d6f9c524d..7deff623e5 100644 --- a/packages/theme/src/popconfirm/smb-theme.js +++ b/packages/theme/src/popconfirm/smb-theme.js @@ -9,5 +9,6 @@ export const tinyPopconfirmSmbTheme = { 'ti-popconfirm-popover-icon-margin-right': 'var(--ti-common-space-base)', 'ti-popconfirm-popover-margin-bottom': '8px', 'ti-popconfirm-popover-text-color': '#191919', - 'ti-popconfirm-popover-line-height': '1.5' + 'ti-popconfirm-popover-line-height': '1.5', + 'ti-popconfirm-popover-icon-margin-bottom': '2px' } diff --git a/packages/theme/src/popconfirm/vars.less b/packages/theme/src/popconfirm/vars.less index 31c22d7325..af3b1df0f9 100644 --- a/packages/theme/src/popconfirm/vars.less +++ b/packages/theme/src/popconfirm/vars.less @@ -22,7 +22,8 @@ // 提示弹窗容器垂直内边距 --ti-popconfirm-popover-container-padding-vertical: var(--ti-common-space-base, 4px); // 提示弹窗图标大小 - --ti-popconfirm-popover-icon-width: var(--ti-common-size-6x, 24px); + --ti-popconfirm-popover-icon-width: calc(var(--ti-common-size-3x) + 2px); + --ti-popconfirm-popover-icon-margin-bottom: unset; // 提示弹窗图标上侧外边距 --ti-popconfirm-popover-icon-margin-right: var(--ti-common-space-2x, 8px); // 提示弹窗底部按钮容器上侧外边距 diff --git a/packages/vue/src/popconfirm/src/index.ts b/packages/vue/src/popconfirm/src/index.ts index a2feff35d8..22495dd020 100644 --- a/packages/vue/src/popconfirm/src/index.ts +++ b/packages/vue/src/popconfirm/src/index.ts @@ -22,7 +22,7 @@ export const $constants = { ICON_MAP: { success: 'icon-success', error: 'icon-error', - info: 'icon-info-solid', + info: 'icon-help', warning: 'icon-warning' } } diff --git a/packages/vue/src/popconfirm/src/pc.vue b/packages/vue/src/popconfirm/src/pc.vue index c97d2884ba..12aa0ce03d 100644 --- a/packages/vue/src/popconfirm/src/pc.vue +++ b/packages/vue/src/popconfirm/src/pc.vue @@ -55,7 +55,7 @@ import { setup, $prefix, defineComponent } from '@opentiny/vue-common' import { renderless, api } from '@opentiny/vue-renderless/popconfirm/vue' import Popover from '@opentiny/vue-popover' import Button from '@opentiny/vue-button' -import { iconError, iconInfoSolid, iconWarning, iconSuccess } from '@opentiny/vue-icon' +import { iconError, IconHelp, iconWarning, iconSuccess } from '@opentiny/vue-icon' import '@opentiny/vue-theme/popconfirm/index.less' export default defineComponent({ @@ -64,7 +64,7 @@ export default defineComponent({ TinyPopover: Popover, TinyButton: Button, IconSuccess: iconSuccess(), - IconInfoSolid: iconInfoSolid(), + IconHelp: IconHelp(), IconWarning: iconWarning(), IconError: iconError() },