小程序加减号弹出框开发文档

发布时间:2023-07-24 06:08:01 作者:ak5671672 阅读量:3729

小程序渐渐好弹出框也就是点击立即抢拼商品的弹出框,开发商要如何写开发文档呢。

<view class='add-rob' bindtap="setModalStatus" data-status="0" wx:if="{{showModalStatus}}">view>
<view class='rob-box' wx:if="{{showModalStatus}}">
 
<view class="shade-shop-detail">
 
<view class="detail-right flexb">
<view class='detail-title-de'>购买数量view>
 
<view class="stepper">
 
<text class="{{minusStatuses?'disabled':''}}" disabled="true" data-idx="{{idx}}" data-index="{{index}}" bindtap="bindMinus">-text>
 
<view class="number" bindchange="bindManual">view>
<input maxlength='5' type='number' class="numberin" value='{{detailDatas.num}}' bindinput="bindChange" />
 
<text class="normal" data-idx="{{idx}}" data-index="{{index}}" bindtap="bindPlus">+text>
view>
view>
view>
 
<view class="shade-shop-button">
<view wx:if="{{myBtn==1?'true':''}}" class="button-add" data-cid='detailDatas.id' bindtap='addShopcar'>加入购物车view>
<view wx:if="{{myBtn==1?'':'true'}}" class="button-add" data-cid='detailDatas.id' bindtap='orderInto'>立即支付view>
view>
view>
// 弹出框显隐控制参数data------
showModalStatus: false,


弹窗
 
// 弹窗
setModalStatus: function (e) {
let that = this;
var animation = wx.createAnimation({
duration:200,
timingFunction: "linear",
delay: 0
})
this.animation = animation
animation.translateY(300).step();
this.setData({
animationData: animation.export(),
})
if (e.currentTarget.dataset.status == 1) {
this.setData(
{
showModalStatus: true
}
);
}
setTimeout(function () {
animation.translateY(0).step()
this.setData({
animationData: animation
})
if (e.currentTarget.dataset.status == 0) {
this.setData(
{
showModalStatus: false
}
);
}
}.bind(this), 200)
},
/*点击购买弹出购买框 遮照购买层 */
.shade{
width: 100%;
height:100%;
position: fixed;
top:0;
left: 0;
background: rgba(0,0,0,0.5);
}
.shade-shop{
width: 100%;
height: 290rpx;
">white;
position: absolute;
bottom: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: flex-end;
}
/* 待添加商品详情 */
.shade-shop-detail{
padding: 20rpx 24rpx 40rpx;
}
/* 关闭及加减 */
.detail-right {
/* width: 190rpx; */
}
.detail-title-de{
font-size: 30rpx;
color: #333333;
margin-bottom: 20rpx;
}
/* 右侧增加减少 */
/* 计算加减 */
.stepper{
display: flex;
border-radius: 5px;
text-align: center;
}
.stepper text{
display: block;
width: 50rpx;
height: 52rpx;
border:1px solid #999999;
line-height: 50rpx;
color: #666666;
}
.stepper input{
display: block;
width: 100rpx;
height: 50rpx;
border:1px solid #999999;
line-height: 50rpx;
color: #333333;
font-size: 28rpx;
text-align: center;
}
/* .stepper wx-input.numberin{
width: 120rpx;
} */
.stepper text:first-child{
border-right: none;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
}
.stepper text:last-child{
border-left: none;
border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
}
/* 减号禁用样式 */
.stepper .disabled{
border-color: rgba(153,153,153,0.2)
}
.button-add{
width: 100%;
height: 100rpx;
color: white;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
}
.button-add{
">#b5c2cf;
}


最新小程序推荐:

铁路12306火车票小程序

铁友12306火车票抢票小程序

智行火车票12306购票小程序

***本网站图片,文字之类版权申明,因为网站可以由注册用户自行上传图片或文字,本网站无法鉴别所上传图片或文字的知识版权,如果侵犯,请及时通知我们,本网站将在第一时间及时删除。

我要评论

网友评论


评论时间:2024-03-05 05:54:01

2.接湖南软件app制作 着进入到公众安卓app开发软件下载 到公众号界面,点击“我要开通公众号”按钮

回复

评论时间:2023-12-19 11:54:02

(2)熟悉计算机软件行业发app开发的方向 展动态,了app制作需要学什么 计算机软件行业发展动态,了解软件测试规范、测试方法和方法

回复
秒制作
Catfish(鲶鱼) Blog V 4.7.3