国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 課堂 > 小程序 > 正文

微信小程序自定義底部彈出框

2020-03-21 16:14:49
字體:
來源:轉載
供稿:網友

本文實例為大家分享了微信小程序底部彈出框展示的具體代碼,供大家參考,具體內容如下

效果圖:

微信小程序,底部,彈出框

html

<view class="commodity_screen" bindtap="hideModal" wx:if="{{showModalStatus}}"></view><view animation="{{animationData}}" class="commodity_attr_box" wx:if="{{showModalStatus}}"></view>

CSS

.commodity_screen { width: 100%; height: 100%; position: fixed; top: 0; left: 0; background: #000; opacity: 0.2; overflow: hidden; z-index: 1000; color: #fff;}.commodity_attr_box { width: 100%; overflow: hidden; position: fixed; bottom: 0; left: 0; z-index: 2000; background: #fff; padding-top: 20rpx;}

 JS動畫樣式

 showModal: function () {  // 顯示遮罩層  var animation = wx.createAnimation({   duration: 200,   timingFunction: "linear",   delay: 0  })  this.animation = animation  animation.translateY(300).step()  this.setData({   animationData: animation.export(),   showModalStatus: true  })  setTimeout(function () {   animation.translateY(0).step()   this.setData({    animationData: animation.export()   })  }.bind(this), 200) }, hideModal: function () {  // 隱藏遮罩層  var animation = wx.createAnimation({   duration: 200,   timingFunction: "linear",   delay: 0  })  this.animation = animation  animation.translateY(300).step()  this.setData({   animationData: animation.export(),  })  setTimeout(function () {   animation.translateY(0).step()   this.setData({    animationData: animation.export(),    showModalStatus: false   })  }.bind(this), 200) }

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持VEVB武林網。


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 兴宁市| 安仁县| 淄博市| 泰来县| 图木舒克市| 香河县| 岐山县| 师宗县| 晋宁县| 靖西县| 广饶县| 乌审旗| 尖扎县| 贵德县| 闽清县| 红原县| 金秀| 钟祥市| 定西市| 九寨沟县| 鄂托克前旗| 谢通门县| 上虞市| 五莲县| 天峨县| 贞丰县| 阳朔县| 冷水江市| 达日县| 安西县| 开阳县| 电白县| 延寿县| 呼和浩特市| 太仆寺旗| 噶尔县| 临城县| 璧山县| 平乡县| 萝北县| 五大连池市|