Skip to content

Commit

Permalink
fix(modal): adjust the title icon display of the modal (#1658)
Browse files Browse the repository at this point in the history
* fix(modal): adjust the title icon display of the modal

* fix: update modal package.json
  • Loading branch information
James-9696 authored Jun 3, 2024
1 parent 268e190 commit 75a81d2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/vue/src/modal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-modal",
"version": "3.16.0",
"version": "3.16.1",
"description": "",
"main": "lib/index.js",
"module": "index.ts",
Expand Down
45 changes: 17 additions & 28 deletions packages/vue/src/modal/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export default defineComponent({
}
},
[
status && state.theme === 'saas'
status
? h(
'div',
{
Expand All @@ -188,18 +188,7 @@ export default defineComponent({
{
class: 'tiny-modal__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'))
]
title || t('ui.alert.title')
),
resize
? h(zoomLocat ? iconMinscreenLeft() : iconFullscreenLeft(), {
Expand All @@ -224,14 +213,14 @@ export default defineComponent({
class: ['tiny-modal__body', type === 'message' ? 'is-message' : '']
},
[
status && state.theme !== 'saas'
type === 'message'
? h(
'div',
{
class: 'tiny-modal__status-wrapper'
},
[
typeof status === 'string' && type === 'message'
typeof status === 'string'
? h(STATUS_MAPPING_COMPINENT[status.toUpperCase()], {
class: [constants.STATUS_MAPPING_CLASSS[status.toUpperCase()]]
})
Expand Down Expand Up @@ -310,6 +299,18 @@ export default defineComponent({
)
]
: [
type === 'confirm'
? h(
Button,
{
on: {
click: this.cancelEvent
},
props: { ...cancelButtonProps }
},
cancelButtonText
)
: null,
h(
Button,
{
Expand All @@ -322,19 +323,7 @@ export default defineComponent({
}
},
confirmButtonText
),
type === 'confirm'
? h(
Button,
{
on: {
click: this.cancelEvent
},
props: { ...cancelButtonProps }
},
cancelButtonText
)
: null
)
]
)
: null,
Expand Down

0 comments on commit 75a81d2

Please sign in to comment.