123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- // pages/Components/classList/classList.js
- Component({
- lifetimes:{
- attached:function(){
- wx.getSystemInfo({
- success: (result) => {
- this.setData({
- height: result.windowHeight
- })
- },
- })
- }
- },
- /**
- * 组件的属性列表
- */
- properties: {
- showLeaveNum: { //是否显示请假余额
- type: Boolean,
- value: false
- },
- showTime:{ //是否显示上课时间
- type: Boolean,
- value: true
- },
- showFlag:{ //是否显示上课状态
- type: Boolean,
- value: true
- },
- showBtn:{ //是否显示功能按钮
- type:Boolean,
- value: false,
- },
- showRadio:{ //是否显示单选按钮
- type:Boolean,
- value: false,
- },
- date: {
- type: String
- },
- list: {
- type: Array,
- value: []
- }
- },
- /**
- * 组件的初始数据
- */
- data: {
- animation: null,
- height:0,
- overflow: 'auto',
- },
- /**
- * 组件的方法列表
- */
- methods: {
- toPages:function(e){
- wx.navigateTo({
- 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 () {
- wx.navigateTo({
- url: '/pages/leaveRecord/leaveRecord',
- })
- },
- radioChange:function(e){
- console.log(JSON.stringify(e.detail.value))
- },
- }
- })
|