fix(modal): the modal prompt box is compatible with the position of titles and content icons (#1570)

* fix: the width of the modal box can be displayed in the center as the browser window size changes

* fix: the modal prompt box is compatible with the position of titles and content icons
This commit is contained in:
James 2024-04-29 20:42:36 -07:00 committed by GitHub
parent d4323a52fe
commit cb5e98b02b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 14 additions and 3 deletions

View File

@ -188,7 +188,18 @@ export default defineComponent({
{
class: 'tiny-modal__title'
},
title || t('ui.alert.title')
[
typeof status === 'string'
? h(STATUS_MAPPING_COMPINENT[status.toUpperCase()], {
class: [constants.STATUS_MAPPING_CLASSS[status.toUpperCase()]],
style: 'display: inline-block; margin-right: 5px;'
})
: h(status, {
class: ['tiny-modal__status-icon'],
style: 'display: inline-block; margin-right: 5px;'
}),
h('span', title || t('ui.alert.title'))
]
),
resize
? h(zoomLocat ? iconMinscreenLeft() : iconFullscreenLeft(), {
@ -213,14 +224,14 @@ export default defineComponent({
class: ['tiny-modal__body', type === 'message' ? 'is-message' : '']
},
[
status && (state.theme !== 'saas' || type === 'message')
status && state.theme !== 'saas'
? h(
'div',
{
class: 'tiny-modal__status-wrapper'
},
[
typeof status === 'string'
typeof status === 'string' && type === 'message'
? h(STATUS_MAPPING_COMPINENT[status.toUpperCase()], {
class: [constants.STATUS_MAPPING_CLASSS[status.toUpperCase()]]
})