Skip to content

Commit 75a81d2

Browse files
authored
fix(modal): adjust the title icon display of the modal (#1658)
* fix(modal): adjust the title icon display of the modal * fix: update modal package.json
1 parent 268e190 commit 75a81d2

File tree

2 files changed

+18
-29
lines changed

2 files changed

+18
-29
lines changed

packages/vue/src/modal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opentiny/vue-modal",
3-
"version": "3.16.0",
3+
"version": "3.16.1",
44
"description": "",
55
"main": "lib/index.js",
66
"module": "index.ts",

packages/vue/src/modal/src/pc.vue

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ export default defineComponent({
166166
}
167167
},
168168
[
169-
status && state.theme === 'saas'
169+
status
170170
? h(
171171
'div',
172172
{
@@ -188,18 +188,7 @@ export default defineComponent({
188188
{
189189
class: 'tiny-modal__title'
190190
},
191-
[
192-
typeof status === 'string'
193-
? h(STATUS_MAPPING_COMPINENT[status.toUpperCase()], {
194-
class: [constants.STATUS_MAPPING_CLASSS[status.toUpperCase()]],
195-
style: 'display: inline-block; margin-right: 5px;'
196-
})
197-
: h(status, {
198-
class: ['tiny-modal__status-icon'],
199-
style: 'display: inline-block; margin-right: 5px;'
200-
}),
201-
h('span', title || t('ui.alert.title'))
202-
]
191+
title || t('ui.alert.title')
203192
),
204193
resize
205194
? h(zoomLocat ? iconMinscreenLeft() : iconFullscreenLeft(), {
@@ -224,14 +213,14 @@ export default defineComponent({
224213
class: ['tiny-modal__body', type === 'message' ? 'is-message' : '']
225214
},
226215
[
227-
status && state.theme !== 'saas'
216+
type === 'message'
228217
? h(
229218
'div',
230219
{
231220
class: 'tiny-modal__status-wrapper'
232221
},
233222
[
234-
typeof status === 'string' && type === 'message'
223+
typeof status === 'string'
235224
? h(STATUS_MAPPING_COMPINENT[status.toUpperCase()], {
236225
class: [constants.STATUS_MAPPING_CLASSS[status.toUpperCase()]]
237226
})
@@ -310,6 +299,18 @@ export default defineComponent({
310299
)
311300
]
312301
: [
302+
type === 'confirm'
303+
? h(
304+
Button,
305+
{
306+
on: {
307+
click: this.cancelEvent
308+
},
309+
props: { ...cancelButtonProps }
310+
},
311+
cancelButtonText
312+
)
313+
: null,
313314
h(
314315
Button,
315316
{
@@ -322,19 +323,7 @@ export default defineComponent({
322323
}
323324
},
324325
confirmButtonText
325-
),
326-
type === 'confirm'
327-
? h(
328-
Button,
329-
{
330-
on: {
331-
click: this.cancelEvent
332-
},
333-
props: { ...cancelButtonProps }
334-
},
335-
cancelButtonText
336-
)
337-
: null
326+
)
338327
]
339328
)
340329
: null,

0 commit comments

Comments
 (0)