Skip to content

Commit 4e01e0b

Browse files
fix: modified close functionality of modal-box (#38)
1 parent 5ae7006 commit 4e01e0b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

mojaglobal-ui/src/components/ModalBox/ModalBox.vue

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<template>
2-
<div class="box-wrapper box-alert-mask" @click="toggle">
2+
<div class="box-wrapper box-alert-mask modal-common">
3+
<div class="dark modal-common" @click="toggle"></div>
34
<div class="box-alert-wrapper">
45
<slot></slot>
56
</div>
@@ -12,28 +13,35 @@
1213
components: {
1314
},
1415
props: {
15-
toggle: { type: Function ,required:true},
16+
toggle: { type: Function,required: true },
1617
}
1718
}
1819
1920
</script>
2021

2122
<style scoped>
2223
.box-wrapper {
24+
z-index: 1;
25+
}
26+
27+
.modal-common {
2328
width: 100%;
2429
height: 100%;
2530
min-height: 100%;
2631
display: flex;
2732
flex-direction: column;
2833
align-items: center;
29-
justify-content:center
34+
justify-content: center;
3035
}
3136
32-
37+
.dark {
38+
z-index: -1;
39+
position: fixed;
40+
cursor: pointer;
41+
}
3342
3443
.box-alert-mask {
3544
position: fixed;
36-
z-index: 9999;
3745
top: 0;
3846
left: 0;
3947
width: 100%;

0 commit comments

Comments
 (0)