Commit e60dca3c authored by JingChao's avatar JingChao
parents 810a3c07 43a72c19
<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,23 @@ export default {
},
start (e) {
e.stopPropagation()
// e.stopPropagation()
},
hideModal () {
this.state = 3
setTimeout(() => {
this.state = 0
this.showModal = false
}, 250)
hideModal (e) {
if(!e){
this.state = 3
setTimeout(() => {
this.state = 0
this.showModal = false
}, 250)
}
if(e && e.target && 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