index.js 840 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // pages/threadedTree/modules/popup/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. sheetTitle: {
  8. type: String
  9. }
  10. },
  11. lifetimes: {
  12. ready: function () {
  13. const that = this;
  14. wx.getSystemInfo({
  15. success: (res => that.setData({
  16. scrollHeight: res.windowHeight - 45
  17. }))
  18. });
  19. }
  20. },
  21. /**
  22. * 组件的初始数据
  23. */
  24. data: {
  25. scrollHeight: 0
  26. },
  27. /**
  28. * 组件的方法列表
  29. */
  30. methods: {
  31. /* 关闭弹窗 */
  32. sheetClose() {
  33. let pages = getCurrentPages(),
  34. prevPage = pages[pages.length - 1];
  35. prevPage.setData({
  36. sheetTitle: ""
  37. })
  38. },
  39. }
  40. })