Forráskód Böngészése

合并提交解决提交bug

Limengbo 6 éve
szülő
commit
367acafcc6
1 módosított fájl, 14 hozzáadás és 1 törlés
  1. 14 1
      pages/index/index.js

+ 14 - 1
pages/index/index.js

@@ -22,7 +22,8 @@ Page({
     flag: true,
     productionData: {},
     num2: 0,
-    productionMore: ''
+    productionMore: '',
+    canvasHeight: ''
   },
   
   lower: function (e) {
@@ -107,6 +108,18 @@ Page({
       }
     }); 
   },
+
+  /*点击获取canvas高度*/
+  onGetHeight: function (e) {
+    const canvasHeight = this.selectComponent("#chat").data.canvasHeight;
+    this.setData({
+      canvasHeight,
+    })
+  },
+  /*更改年级*/
+  setgrade: function (e) {
+    this.setGrade.showPopup()
+  },
   onLoad: function (options) {
     //获取更改年级组件
     this.setGrade = this.selectComponent("#set-grade");