feat(popconfirm): [popconfirm] Adapting to the SMB theme (#2072)

This commit is contained in:
东风使命必达 2024-09-06 20:00:18 -07:00 committed by GitHub
parent 33968fca15
commit 3bd664a88f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 14 additions and 6 deletions

View File

@ -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('这是气泡确认框提示内容文本描述,这是两行内容的展示样式。')
</script>

View File

@ -19,7 +19,7 @@ export default {
data() {
return {
title: '这是气泡标题',
message: '这是气泡确认框提示内容文本描述,这是两行内容的展示样式,文本内容很长很长。'
message: '这是气泡确认框提示内容文本描述,这是两行内容的展示样式。'
}
}
}

View File

@ -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);
}

View File

@ -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'
}

View File

@ -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;
}

View File

@ -22,7 +22,7 @@
:class="['tiny-popconfirm-popover__icon', type ? `tiny-popconfirm-popover--${type}` : '']"
>
</component>
<div class="tiny-popconfirm-popover__title">
<div class="tiny-popconfirm-popover__title" :class="[message ? '' : 'no-message']">
{{ title }}
</div>
</div>
@ -96,7 +96,7 @@ export default defineComponent({
},
width: {
type: [String, Number],
default: '350'
default: '260'
},
type: [String, Object],
reference: {},