uniapp小程序使用switchTab跳转到tabBar页面不刷新问题--解决

                             uni.switchTab({
                                                    url: "../worker/worker",
                                                    success: (res) => {
                                                        let data = {
                                                            tabIndex: 0 // 要传递的参数,不能带在url后面
                                                        }
                                                        let page = getCurrentPages().pop();
                                                        if (page == undefined || page == null) return;
                                                        page.onLoad(data); // 直接调用指定页面的onLoad方法实现刷新
                                                    }
                                                });

原文地址: https://www.cnblogs.com/Dark-fire-liehuo/p/11418002.html

posted on 2020-08-06 14:41  小虾米吖~  阅读(4057)  评论(0编辑  收藏  举报