<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>
vue2.0 popwindow
最新推荐文章于 2023-06-07 20:20:21 发布