Commit 657b341d authored by JingChao's avatar JingChao

Update Modal.vue

parent dd4dde99
<template>
<!--<transition :name="transition">-->
<div v-show="showModal" :class="active" class="modal-backdrop" @touchstart="hideModal">
<div v-show="showModal" :class="active" class="modal-backdrop" @click.capture="hideModal">
<div class="modal-backdrop-bg"/>
<div
:class="[modalClass,transition]"
......@@ -77,14 +77,16 @@ export default {
},
start (e) {
e.stopPropagation()
// e.stopPropagation()
},
hideModal () {
this.state = 3
setTimeout(() => {
this.state = 0
this.showModal = false
}, 250)
hideModal (e) {
if(e.target.className.indexOf('modal-backdrop') === 0){
this.state = 3
setTimeout(() => {
this.state = 0
this.showModal = false
}, 250)
}
},
},
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment