需求 vue点击其他任意地方关闭弹窗或遮罩层 代码 <!-- 遮罩层 --> <div class="dialog" v-show="shareShow" @click="shareShow=!shareShow"> </div> 注意:遮罩层样式是浮动的 遮罩层样式: