|
@@ -1,5 +1,16 @@
|
|
// pages/Components/classList/classList.js
|
|
// pages/Components/classList/classList.js
|
|
Component({
|
|
Component({
|
|
|
|
+ lifetimes:{
|
|
|
|
+ attached:function(){
|
|
|
|
+ wx.getSystemInfo({
|
|
|
|
+ success: (result) => {
|
|
|
|
+ this.setData({
|
|
|
|
+ height: result.windowHeight
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
/**
|
|
/**
|
|
* 组件的属性列表
|
|
* 组件的属性列表
|
|
*/
|
|
*/
|
|
@@ -37,7 +48,9 @@ Component({
|
|
* 组件的初始数据
|
|
* 组件的初始数据
|
|
*/
|
|
*/
|
|
data: {
|
|
data: {
|
|
-
|
|
|
|
|
|
+ animation: null,
|
|
|
|
+ height:0,
|
|
|
|
+ overflow: 'auto',
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -49,6 +62,36 @@ Component({
|
|
url: e.currentTarget.dataset.url,
|
|
url: e.currentTarget.dataset.url,
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ showChoose:function(){
|
|
|
|
+ this.animation = wx.createAnimation({
|
|
|
|
+ timingFunction: 'linear',
|
|
|
|
+ })
|
|
|
|
+ const bottom = 0
|
|
|
|
+ this.animation.translateY(bottom).step()
|
|
|
|
+ this.setData({
|
|
|
|
+ overflow: 'hidden',
|
|
|
|
+ animation:this.animation.export(),
|
|
|
|
+ bottom
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ hideChoose:function(){
|
|
|
|
+ this.animation = wx.createAnimation({
|
|
|
|
+ timingFunction: 'linear',
|
|
|
|
+ })
|
|
|
|
+ const bottom = 2000
|
|
|
|
+ this.animation.translateY(bottom).step()
|
|
|
|
+ this.setData({
|
|
|
|
+ overflow: 'auto',
|
|
|
|
+ animation:this.animation.export(),
|
|
|
|
+ })
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.setData({
|
|
|
|
+ bottom
|
|
|
|
+ })
|
|
|
|
+ }, 400);
|
|
|
|
+ },
|
|
|
|
+
|
|
getLeaveNumList: function () {
|
|
getLeaveNumList: function () {
|
|
wx.navigateTo({
|
|
wx.navigateTo({
|
|
url: '/pages/leaveRecord/leaveRecord',
|
|
url: '/pages/leaveRecord/leaveRecord',
|