vue2.0 popwindow

来源:互联网 发布:大数据 需要学什么 编辑:程序博客网 时间:2024/06/09 15:05
<template>    <div class="fill">        <slot></slot>        <div v-if="popVisible" class="full" :style="{backgroundColor:bgColor}" style="overflow: hidden"             @click="$emit('hide');">            <slot name="pop"></slot>        </div>    </div></template><style lang="less" scoped>    @import "~styles/base.less";    .full{        position: absolute;        top:0;        bottom: 0;        right: 0;        left: 0;        justify-content: center;        align-items: center;    }</style><script>    module.exports = {        props: {            popVisible: {                default: false            },            bgColor: {                default: 'rgba(0,0,0,.2)'            }        },        data() {            return {};        },        methods: {},        created: function () {        }    };</script>