mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
[improvement] move overlay component (#2192)
This commit is contained in:
34
packages/overlay/index.vue
Normal file
34
packages/overlay/index.vue
Normal 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>
|
Reference in New Issue
Block a user