国产探花免费观看_亚洲丰满少妇自慰呻吟_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武林網。


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 沁水县| 化隆| 兴和县| 湖北省| 扬州市| 城步| 东宁县| 沭阳县| 杭锦旗| 绍兴市| 武穴市| 盐池县| 保德县| 峨山| 肇东市| 甘肃省| 禄劝| 永城市| 兖州市| 文成县| 神池县| 利川市| 吉林市| 天津市| 神池县| 乳源| 彰武县| 榕江县| 瓮安县| 昆明市| 漳平市| 南宁市| 新邵县| 平湖市| 盈江县| 旌德县| 漯河市| 吴忠市| 类乌齐县| 密山市| 额尔古纳市|