npm install -g cnpm --registry=https://registry.npm.taobao.org
https://blog.csdn.net/qq_40414159/article/details/83277910
.ui-center-mask {position: fixed;z-index: 888;top: 0;left: 0;width: 100%;height: 100%;overflow: auto;} .ui-center-mask-bg { display: block; position: fixed; z-index: 21; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.65);} .ui-center-mask-block{position:relative;z-index: 22;right: 0;top: 0;width: 100%;height: 100%;box-sizing:border-box;overflow: auto;display: table;text-align: center;} .ui-center-mask-wrap{display:table-cell;vertical-align: middle;} .ui-center-mask-content{position: relative;display: inline-block;width: 80%;height: auto;background: #fff;border-radius: .7rem;padding: 10px 20px 30px;text-align: left;box-sizing: border-box} .ui-center-mask-close {position: absolute;z-index: 10;top: 12px;right: 12px;width: 21px;height: 21px;} .ui-center-mask-close i {display: block;width: 100%;height: 100%;background-image: url('../assets/img/icon-close.png');background-repeat: no-repeat;background-size: contain;} .ui-center-mask-close.close-f i {background-image: url("../assets/img/icon-close-f.png")} .ui-center-mask-close.close-circle{width: 32px;height: 32px} .ui-center-mask-close.close-circle i {background-image: url("../assets/img/icon-close-circle.png")}
<div id="popup_gomember" class="ui-center-mask member-mask hidden"> <div class="ui-center-mask-bg"></div> <div class="ui-center-mask-block"> <div class="ui-center-mask-wrap"> <div class="ui-center-mask-content vip-wrap"> <a href="javascript:void(0);" class="ui-center-mask-close close-f close"><i></i></a> <div> <div class="main-wrap"> <img src="../assets/img/img-gomember.png" alt="" @click="gotoMember"> </div> </div> </div> </div> </div> </div>
showCenter (obj) { document.body.style.overflow = 'hidden' let e = document.getElementById(obj) e.classList.remove('hidden') let emclose = e.getElementsByClassName('close') let _this = this for (let i = 0; i < emclose.length; i++) { emclose[i].onclick = function (n) { _this.hiddenCenter(obj) } } }
Me discréditer résister, peut supporter beaucoup de compliments!