// module/health/components/report-health-status/report-health-status.ts function getDraggableSheetContext(this: any) { return this as { scroll: WechatMiniprogram.DraggableSheetContext } } const { windowHeight } = wx.getSystemInfoSync() const menuRect = wx.getMenuButtonBoundingClientRect() const menuBottom = menuRect.bottom + 1 Component({ options: { multipleSlots: true, }, properties: { dataset: { type: Object }, loading: { type: Boolean, value: false }, message: { type: String, value: '' }, }, data: { sheetHeight: windowHeight - menuBottom, initialSize: 0, minSize: 0, maxSize: 1, }, lifetimes: { created() { this.createSelectorQuery().select('.draggable-sheet-wrapper').node().exec(res => { getDraggableSheetContext.call(this).scroll = res[0].node; }) } }, methods: { showList() { console.log('showList', this); getDraggableSheetContext.call(this).scroll.scrollTo({ size: 0.5, pixels: 600, animated: true, duration: 300, easingFunction: 'ease' }) }, toInfoPage() { this.triggerEvent('info') } } })