[improvement] move overlay component (#2192)

This commit is contained in:
neverland
2018-11-30 16:40:50 +08:00
committed by GitHub
parent 996c67b4fc
commit 89ff50944c
11 changed files with 40 additions and 18 deletions

View File

@@ -0,0 +1,34 @@
<template>
<transition name="van-fade">
<div
v-show="visible"
class="van-overlay"
:class="className"
:style="style"
@touchmove.prevent.stop
@click="$emit('click', $event)"
/>
</transition>
</template>
<script>
export default {
name: 'overlay',
props: {
zIndex: Number,
visible: Boolean,
className: String,
customStyle: Object
},
computed: {
style() {
return {
zIndex: this.zIndex,
...this.customStyle
};
}
}
};
</script>