赞
踩
this.triggerEvent(‘cancel’)
},
// 点击确定按钮的回调函数
confirm() {
this.setData({ show: false })
this.triggerEvent(‘confirm’)
}
}
})
index.wxss的代码:
.mask {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(0, 0, 0, 0.63);
z-index: 9999;
}
.modal-content {
display: flex;
flex-direction: column;
width: 90%;
background-color: #fff;
border-radius: 10rpx;
}
.main-content {
width: auto;
height: 100%;
padding: 10px;
text-align: center;
justify-content: center;
overflow: hidden;
}
.title{
height: 80rpx;
line-height: 80rpx;
text-align: center;
border-bottom: 1px solid #eee;
font-size: 28rpx;
color: #333;
overflow: hidden;
background-color: #F8F8F8;
}
.modal-btn-wrapper {
display: flex;
flex-direction: row;
height: 100rpx;
line-height: 100rpx;
border-top: 1rpx solid rgba(7, 17, 27, 0.1);
}
.cancel-btn, .confirm-btn {
flex: 1;
padding: 10px;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。