Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set page title error #605

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/friendly-needles-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alita/plugins': patch
---

fix: set page title no work
2 changes: 2 additions & 0 deletions examples/alita2/src/pages/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ const SettingsPage: FC<PageProps> = ({ settings, dispatch, location }) => {
navBar: {
pageBackground: '#000000',
onLeftClick,
hideNavBar: true,
pageTitle: '你好1',
rightContent: [
<Icon key="0" type="search" style={{ marginRight: '16px' }} />,
<Icon key="1" type="ellipsis" />,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/templates/mobile-layout/layout.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ const AlitaLayout: FC<AlitaLayoutProps> = ({
);
const isTabsApp = list.length > 0;
const titleListItem = checkTitleList(pathname, titleList);
const realTitle = titleListItem || pageTitle || documentTitle || '';
const realTitle = realNavBar?.pageTitle || titleListItem || pageTitle || documentTitle || '';

// 头部永久固定,部分页面需要跟随页面流滚动,可以选择隐藏 NavBar,在页面中手动添加
const headFixed = realNavBar.fixed;
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/templates/mobile-layout/layout5.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ const AlitaLayout: FC<AlitaLayoutProps> = ({
);
const isTabsApp = list.length > 0;
const titleListItem = checkTitleList(pathname, titleList);
const realTitle = titleListItem || pageTitle || documentTitle || '';
const realTitle = realNavBar?.pageTitle || titleListItem || pageTitle || documentTitle || '';

// 头部永久固定,部分页面需要跟随页面流滚动,可以选择隐藏 NavBar,在页面中手动添加
const headFixed = realNavBar.fixed;
Expand Down
Loading