Skip to content

Commit

Permalink
chore: merge
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaohuoni committed Sep 21, 2023
2 parents a614405 + 2ca0a17 commit eeda784
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/slimy-chairs-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alita/plugins': patch
---

fix: useEffets error
10 changes: 6 additions & 4 deletions packages/plugins/templates/mobile-layout/layout.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,12 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
prevPathName = location.pathname;
}, 10);
}, [location.pathname]);
layoutEmitter?.useSubscription?.((e) => {
setPageNavBar(getPageNavBar());
setTabBarList(getTabBarList());
});
useEffect(()=>{
layoutEmitter?.useSubscription?.((e) => {
setPageNavBar(getPageNavBar());
setTabBarList(getTabBarList());
});
},[]);
let element = useOutlet();
{{#hasKeepAlive}}
element = useKeepOutlets();
Expand Down
10 changes: 6 additions & 4 deletions packages/plugins/templates/mobile-layout/layout5.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,12 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
prevPathName = location.pathname;
}, 10);
}, [location.pathname]);
layoutEmitter?.useSubscription?.((e) => {
setPageNavBar(getPageNavBar());
setTabBarList(getTabBarList());
});
useEffect(()=>{
layoutEmitter?.useSubscription?.((e) => {
setPageNavBar(getPageNavBar());
setTabBarList(getTabBarList());
});
},[]);
let element = useOutlet();
{{#hasKeepAlive}}
element = useKeepOutlets();
Expand Down

0 comments on commit eeda784

Please sign in to comment.