- 使用eventChannel与被打开页面通信,手机端第一次打开显示白屏第二打开才显示数据,为什么呢?
//主页面 toParticulars(e) { console.log(e.currentTarget.dataset.id); var j = e.currentTarget.dataset.id; let list = this.data.lists; for (var i = 0; i < list.length; i++) { if (list[i].id == j) { listconnect[0] = list[i]; } } wx.navigateTo({ url: "/pages/notice/detail", success: (res) => { res.eventChannel.emit("acceptDataFromOpenerPage", { data: listconnect, }); }, }); } //被打开页面 onLoad: function (options) { const eventChannel = this.getOpenerEventChannel() eventChannel.on('acceptDataFromOpenerPage', function (data) { console.log(data.data) list = data.data }) this.setData({ list: list }) }, 手机型号是iphone11
2023-05-12 - 组件scroll-view无法使用flex布局?flex布局在scroll-view不生效
scroll-view设置flex布局不生效,把scroll-view改成view就好使
2023-05-11