Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion examples/sites/demos/pc/app/popconfirm/basic-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
data() {
return {
title: '这是气泡标题',
message: '这是气泡确认框提示内容文本描述,这是两行内容的展示样式,文本内容很长很长。'
message: '这是气泡确认框提示内容文本描述,这是两行内容的展示样式。'
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion packages/theme/src/popconfirm/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
display: flex;
align-items: center;
line-height: var(--ti-popconfirm-popover-line-height);
margin-bottom: var(--ti-popconfirm-popover-margin-bottom);
}
.no-message {
font-weight: 400;
}

&__icon {
Expand All @@ -57,7 +61,7 @@
}

&__content {
color: #5c6976;
color: var(--ti-popconfirm-popover-text-color);
line-height: var(--ti-popconfirm-popover-line-height);
}

Expand Down
5 changes: 4 additions & 1 deletion packages/theme/src/popconfirm/smb-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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-bottom': '8px',
'ti-popconfirm-popover-text-color': '#191919',
'ti-popconfirm-popover-line-height': '1.5'
}
1 change: 1 addition & 0 deletions packages/theme/src/popconfirm/vars.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 2 additions & 2 deletions packages/vue/src/popconfirm/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -96,7 +96,7 @@ export default defineComponent({
},
width: {
type: [String, Number],
default: '350'
default: ''
},
type: [String, Object],
reference: {},
Expand Down
Loading