Commit 657b341d authored by JingChao's avatar JingChao

Update Modal.vue

parent dd4dde99
<template> <template>
<!--<transition :name="transition">--> <!--<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="modal-backdrop-bg"/>
<div <div
:class="[modalClass,transition]" :class="[modalClass,transition]"
...@@ -77,14 +77,16 @@ export default { ...@@ -77,14 +77,16 @@ export default {
}, },
start (e) { start (e) {
e.stopPropagation() // e.stopPropagation()
}, },
hideModal () { hideModal (e) {
this.state = 3 if(e.target.className.indexOf('modal-backdrop') === 0){
setTimeout(() => { this.state = 3
this.state = 0 setTimeout(() => {
this.showModal = false this.state = 0
}, 250) 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