mirror of
https://github.com/ElemeFE/element.git
synced 2025-12-19 12:04:02 +08:00
Initial commit
This commit is contained in:
55
examples/components/lightbox.vue
Normal file
55
examples/components/lightbox.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<div class="dialog d-popup-center"
|
||||
v-if="rendered"
|
||||
v-show="visible"
|
||||
:transition="transition">
|
||||
<div class="dialog-content">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Popup from 'vue-popup';
|
||||
import 'vue-popup/lib/popup.css';
|
||||
|
||||
export default {
|
||||
mixins: [Popup],
|
||||
|
||||
props: {
|
||||
showClose: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showModal: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
modal: {
|
||||
default: true
|
||||
},
|
||||
closeOnClickModal: {
|
||||
default: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
willClose() {
|
||||
this.visible = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="css">
|
||||
.dialog {
|
||||
position: fixed;
|
||||
|
||||
img {
|
||||
width: 60vw;
|
||||
}
|
||||
}
|
||||
.app__main .d-modal {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user