微信 - 蒙版弹窗

屏幕快照 2018-11-05 下午5.07.48.png
<view class="modalDlg" wx:if="{{showModal}}">

       <view class='close_mask' bindtap="close_mask">X</view>
       <input class='recharge_amount' type='text' placeholder='充值金额' maxlength="8" value='{{recharge_amount}}'></input>
       <button class='save_money' type='submit'>立即充值</button>
     </view>
     <button class='recharge' bindtap="submit">充值</button>
     <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view>

// 点击充值弹窗
 submit: function () {
   this.setData({
     showModal: true
   })
 },
 preventTouchMove: function () {

 },


 close_mask: function () {
   this.setData({
     showModal: false
   })
 },

/* 点击充值弹窗 */

.mask {
 width: 100%;
 height: 100%;
 position: fixed;
 top: 0;
 left: 0;
 background: #000;
 z-index: 9000;
 opacity: 0.7;
}

.modalDlg {
 width: 580rpx;
 height: 450rpx;
 position: fixed;
 top: 50%;
 left: 0;
 z-index: 9999;
 margin: -370rpx 85rpx;
 background-color: #fff;
 border-radius: 36rpx;
 display: flex;
 flex-direction: column;
 align-items: center;
}

.recharge_amount {
 color: #aaa;
 width: 450rpx;
 height: 80rpx;
 background: #f1f1f1;
 text-align: center;
 border-radius: 12rpx;
 margin-top: 56rpx;
 text-indent: 0;
}

.save_money {
 color: #fff;
 width: 270rpx;
 height: 80rpx;
 line-height: 80rpx;
 background: #d95155;
 text-align: center;
 border-radius: 12rpx;
 margin-top: 80rpx;
 font-size: 28rpx;
 text-indent: 0em;
}

.close_mask {
 color: #000;
 position: relative;
 left: 40%;
 /* top: -82%; */
 font-size: 32rpx;
}

/*弹窗结束  */
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容