Component({ properties: { list: Array, callback: Function }, lifetimes: { attached: function () { wx.getSystemInfo({ success: res => { this.setData({ safeAreaBot: res.screenHeight - res.safeArea.bottom }) } }) }, }, options: { addGlobalClass: true }, data: { safeAreaBot: 0, show: false }, methods: { onClose() { this.setData({ show: false }) }, callback(e) { console.log(e) const { item } = e.currentTarget.dataset; if (!item) return; this.triggerEvent("callback", item) }, /* open(){ this.setData({ show: true }) } */ } })