// pages/threadedTree/modules/popup/index.js Component({ /** * 组件的属性列表 */ properties: { sheetTitle: { type: String } }, lifetimes: { ready: function () { const that = this; wx.getSystemInfo({ success: (res => that.setData({ scrollHeight: res.windowHeight - 45 })) }); } }, /** * 组件的初始数据 */ data: { scrollHeight: 0 }, /** * 组件的方法列表 */ methods: { /* 关闭弹窗 */ sheetClose() { let pages = getCurrentPages(), prevPage = pages[pages.length - 1]; prevPage.setData({ sheetTitle: "" }) }, } })