mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
Fixed a bug where interrupting "close" event was not working
This commit is contained in:
@@ -2,7 +2,8 @@
|
|||||||
<transition name="overlay-fade">
|
<transition name="overlay-fade">
|
||||||
<div v-if="visibility.overlay"
|
<div v-if="visibility.overlay"
|
||||||
ref="overlay"
|
ref="overlay"
|
||||||
class="nice-modal-overlay"
|
class="v-j-modal-overlay"
|
||||||
|
:data-modal="name"
|
||||||
@mousedown.stop="toggle(false)">
|
@mousedown.stop="toggle(false)">
|
||||||
<transition :name="transition">
|
<transition :name="transition">
|
||||||
<div v-if="visibility.modal"
|
<div v-if="visibility.modal"
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
},
|
},
|
||||||
classes: {
|
classes: {
|
||||||
type: [String, Array],
|
type: [String, Array],
|
||||||
default: 'nice-modal',
|
default: 'v-j-modal',
|
||||||
},
|
},
|
||||||
minWidth: {
|
minWidth: {
|
||||||
type: Number,
|
type: Number,
|
||||||
@@ -212,7 +213,7 @@
|
|||||||
|
|
||||||
let stopEventExecution = false
|
let stopEventExecution = false
|
||||||
|
|
||||||
const stop = () => { stopEventExecution = false }
|
const stop = () => { stopEventExecution = true }
|
||||||
const beforeEvent = this.genEventObject({ stop, state, params })
|
const beforeEvent = this.genEventObject({ stop, state, params })
|
||||||
|
|
||||||
this.$emit(beforeEventName, beforeEvent)
|
this.$emit(beforeEventName, beforeEvent)
|
||||||
@@ -285,7 +286,7 @@
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.nice-modal-overlay {
|
.v-j-modal-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -321,7 +322,7 @@
|
|||||||
transform: translateY(-20px);
|
transform: translateY(-20px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.nice-modal {
|
.v-j-modal {
|
||||||
background: white;
|
background: white;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
@@ -330,7 +331,7 @@
|
|||||||
|
|
||||||
//background: yellow !important;
|
//background: yellow !important;
|
||||||
|
|
||||||
&.nice-modal-fullscreen {
|
&.v-j-modal-fullscreen {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user