From ad849e99ef74ba1ac5dad4096279feca64457cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=9C=E9=A3=8E=E4=BD=BF=E5=91=BD=E5=BF=85=E8=BE=BE?= <1664677472@qq.com> Date: Mon, 9 Sep 2024 23:44:17 -0700 Subject: [PATCH] feat(popconfirm): [popconfirm] Adapting to the SMB theme (#2085) * feat(popconfirm): [popconfirm] Adapting to the SMB theme * feat(popconfirm): [popconfirm] Adapting to the SMB theme * feat(popconfirm): [popconfirm] Adapting to the SMB theme * feat(popconfirm): [popconfirm] Adapting to the SMB theme * Update pc.vue --- packages/design/smb/src/popconfirm/index.ts | 4 ++-- packages/theme/src/popconfirm/index.less | 9 +++++---- 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, 14 insertions(+), 11 deletions(-) diff --git a/packages/design/smb/src/popconfirm/index.ts b/packages/design/smb/src/popconfirm/index.ts index 3e4310816..664bbe6f0 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 02829e16c..dffef22b9 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 { @@ -80,18 +81,18 @@ } &--info { - fill: #5cacff; + fill: #1476FF; } &--error { - fill: #eb171f; + fill: #F23030; } &--warning { - fill: #fdc000; + fill: #FF8800; } &--success { - fill: #00a874; + fill: #5CB300; } } diff --git a/packages/theme/src/popconfirm/smb-theme.js b/packages/theme/src/popconfirm/smb-theme.js index 2d6f9c524..7deff623e 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 31c22d732..af3b1df0f 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 a2feff35d..22495dd02 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 c97d2884b..40c94035e 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() },