From 66bdda506c0aece2978e750976c5d72021ef9c82 Mon Sep 17 00:00:00 2001
From: You-Hw-Y <1664677472@qq.com>
Date: Fri, 6 Sep 2024 03:20:53 -0700
Subject: [PATCH 1/5] feat(popconfirm): [popconfirm] Adapting to the SMB theme
---
.../demos/pc/app/popconfirm/basic-usage-composition-api.vue | 2 +-
examples/sites/demos/pc/app/popconfirm/basic-usage.vue | 2 +-
packages/theme/src/popconfirm/index.less | 6 +++++-
packages/theme/src/popconfirm/smb-theme.js | 5 ++++-
packages/theme/src/popconfirm/vars.less | 1 +
packages/vue/src/popconfirm/src/pc.vue | 4 ++--
6 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/examples/sites/demos/pc/app/popconfirm/basic-usage-composition-api.vue b/examples/sites/demos/pc/app/popconfirm/basic-usage-composition-api.vue
index ced48a4421..6d2bd2ab38 100644
--- a/examples/sites/demos/pc/app/popconfirm/basic-usage-composition-api.vue
+++ b/examples/sites/demos/pc/app/popconfirm/basic-usage-composition-api.vue
@@ -13,5 +13,5 @@ import { ref } from 'vue'
import { Popconfirm as TinyPopconfirm, Button as TinyButton } from '@opentiny/vue'
const title = ref('这是气泡标题')
-const message = ref('这是气泡确认框提示内容文本描述,这是两行内容的展示样式,文本内容很长很长。')
+const message = ref('这是气泡确认框提示内容文本描述,这是两行内容的展示样式。')
diff --git a/examples/sites/demos/pc/app/popconfirm/basic-usage.vue b/examples/sites/demos/pc/app/popconfirm/basic-usage.vue
index 36fbd963ec..5dbf83ff97 100644
--- a/examples/sites/demos/pc/app/popconfirm/basic-usage.vue
+++ b/examples/sites/demos/pc/app/popconfirm/basic-usage.vue
@@ -19,7 +19,7 @@ export default {
data() {
return {
title: '这是气泡标题',
- message: '这是气泡确认框提示内容文本描述,这是两行内容的展示样式,文本内容很长很长。'
+ message: '这是气泡确认框提示内容文本描述,这是两行内容的展示样式。'
}
}
}
diff --git a/packages/theme/src/popconfirm/index.less b/packages/theme/src/popconfirm/index.less
index efee76f8cd..e3169a20ac 100644
--- a/packages/theme/src/popconfirm/index.less
+++ b/packages/theme/src/popconfirm/index.less
@@ -42,6 +42,10 @@
display: flex;
align-items: center;
line-height: var(--ti-popconfirm-popover-line-height);
+ margin-bottom: var(--ti-popconfirm-popover-margin-bottomt);;
+ }
+ .no-message {
+ font-weight: 400;
}
&__icon {
@@ -57,7 +61,7 @@
}
&__content {
- color: #5c6976;
+ color: var(--ti-popconfirm-popover-text-color);
line-height: var(--ti-popconfirm-popover-line-height);
}
diff --git a/packages/theme/src/popconfirm/smb-theme.js b/packages/theme/src/popconfirm/smb-theme.js
index 568e0f37f9..1fb26544e0 100644
--- a/packages/theme/src/popconfirm/smb-theme.js
+++ b/packages/theme/src/popconfirm/smb-theme.js
@@ -6,5 +6,8 @@ export const tinyPopconfirmSmbTheme = {
'ti-popconfirm-popover-icon-width': 'var(--ti-common-size-4x)',
'ti-popconfirm-popover-title-font-weight': 'var(--ti-common-font-weight-bold)',
'ti-popconfirm-popover-title-font-size': 'var(--ti-common-font-size-2)',
- 'ti-popconfirm-popover-icon-margin-right': 'var(--ti-common-space-base)'
+ 'ti-popconfirm-popover-icon-margin-right': 'var(--ti-common-space-base)',
+ 'ti-popconfirm-popover-margin-bottomt': '8px',
+ 'ti-popconfirm-popover-text-color': '#191919',
+ 'ti-popconfirm-popover-line-height': '1.5'
}
diff --git a/packages/theme/src/popconfirm/vars.less b/packages/theme/src/popconfirm/vars.less
index 4263d97dde..31c22d7325 100644
--- a/packages/theme/src/popconfirm/vars.less
+++ b/packages/theme/src/popconfirm/vars.less
@@ -30,4 +30,5 @@
// 标题字重、大小
--ti-popconfirm-popover-title-font-size: var(--ti-common-font-size-1);
--ti-popconfirm-popover-title-font-weight: var(--ti-common-font-weight-normal, 400);
+ --ti-popconfirm-popover-text-color: #5c6976;
}
diff --git a/packages/vue/src/popconfirm/src/pc.vue b/packages/vue/src/popconfirm/src/pc.vue
index 4cad7c45a9..65eecbcb1e 100644
--- a/packages/vue/src/popconfirm/src/pc.vue
+++ b/packages/vue/src/popconfirm/src/pc.vue
@@ -22,7 +22,7 @@
:class="['tiny-popconfirm-popover__icon', type ? `tiny-popconfirm-popover--${type}` : '']"
>
-
@@ -96,7 +96,7 @@ export default defineComponent({
},
width: {
type: [String, Number],
- default: '350'
+ default: '260'
},
type: [String, Object],
reference: {},
From 37f64e875476358d4003cb0e4bbb6f70148d0f94 Mon Sep 17 00:00:00 2001
From: You-Hw-Y <1664677472@qq.com>
Date: Sun, 8 Sep 2024 18:31:12 -0700
Subject: [PATCH 2/5] feat(popconfirm): [popconfirm] Adapting to the SMB theme
---
packages/theme/src/popconfirm/index.less | 2 +-
packages/theme/src/popconfirm/smb-theme.js | 2 +-
packages/vue/src/popconfirm/src/pc.vue | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/packages/theme/src/popconfirm/index.less b/packages/theme/src/popconfirm/index.less
index e3169a20ac..02829e16cc 100644
--- a/packages/theme/src/popconfirm/index.less
+++ b/packages/theme/src/popconfirm/index.less
@@ -42,7 +42,7 @@
display: flex;
align-items: center;
line-height: var(--ti-popconfirm-popover-line-height);
- margin-bottom: var(--ti-popconfirm-popover-margin-bottomt);;
+ margin-bottom: var(--ti-popconfirm-popover-margin-bottom);
}
.no-message {
font-weight: 400;
diff --git a/packages/theme/src/popconfirm/smb-theme.js b/packages/theme/src/popconfirm/smb-theme.js
index 1fb26544e0..2d6f9c524d 100644
--- a/packages/theme/src/popconfirm/smb-theme.js
+++ b/packages/theme/src/popconfirm/smb-theme.js
@@ -7,7 +7,7 @@ export const tinyPopconfirmSmbTheme = {
'ti-popconfirm-popover-title-font-weight': 'var(--ti-common-font-weight-bold)',
'ti-popconfirm-popover-title-font-size': 'var(--ti-common-font-size-2)',
'ti-popconfirm-popover-icon-margin-right': 'var(--ti-common-space-base)',
- 'ti-popconfirm-popover-margin-bottomt': '8px',
+ 'ti-popconfirm-popover-margin-bottom': '8px',
'ti-popconfirm-popover-text-color': '#191919',
'ti-popconfirm-popover-line-height': '1.5'
}
diff --git a/packages/vue/src/popconfirm/src/pc.vue b/packages/vue/src/popconfirm/src/pc.vue
index 65eecbcb1e..c97d2884ba 100644
--- a/packages/vue/src/popconfirm/src/pc.vue
+++ b/packages/vue/src/popconfirm/src/pc.vue
@@ -96,7 +96,7 @@ export default defineComponent({
},
width: {
type: [String, Number],
- default: '260'
+ default: ''
},
type: [String, Object],
reference: {},
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 3/5] 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()
},
From 56b293ae089f72d46165c89dd2365fdcd28fee61 Mon Sep 17 00:00:00 2001
From: You-Hw-Y <1664677472@qq.com>
Date: Mon, 9 Sep 2024 00:38:21 -0700
Subject: [PATCH 4/5] feat(popconfirm): [popconfirm] Adapting to the SMB theme
---
packages/theme/src/popconfirm/index.less | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/packages/theme/src/popconfirm/index.less b/packages/theme/src/popconfirm/index.less
index b430c3e31e..dffef22b99 100644
--- a/packages/theme/src/popconfirm/index.less
+++ b/packages/theme/src/popconfirm/index.less
@@ -81,11 +81,11 @@
}
&--info {
- fill: #5cacff;
+ fill: #1476FF;
}
&--error {
- fill: #eb171f;
+ fill: #F23030;
}
&--warning {
@@ -93,6 +93,6 @@
}
&--success {
- fill: #00a874;
+ fill: #5CB300;
}
}
From c79e6989beac2d4598346e9e16b8be2f53ea901e 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: Tue, 10 Sep 2024 10:09:40 +0800
Subject: [PATCH 5/5] Update pc.vue
---
packages/vue/src/popconfirm/src/pc.vue | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/vue/src/popconfirm/src/pc.vue b/packages/vue/src/popconfirm/src/pc.vue
index 12aa0ce03d..40c94035e3 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, IconHelp, 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(),
- IconHelp: IconHelp(),
+ IconHelp: iconHelp(),
IconWarning: iconWarning(),
IconError: iconError()
},