feat: support document title
This commit is contained in:
parent
5fdbc1b10d
commit
ddcf0f4219
@ -1,6 +1,7 @@
|
||||
import { defineConfig } from 'umi';
|
||||
|
||||
export default defineConfig({
|
||||
title: false,
|
||||
nodeModulesTransform: {
|
||||
type: 'none',
|
||||
},
|
||||
|
@ -3,6 +3,7 @@ import ViewFactory from '@/components/views';
|
||||
import { PageHeader, Tabs, Button, Statistic, Descriptions } from 'antd';
|
||||
import { useRequest, request, Spin } from '@nocobase/client';
|
||||
import { getPathName } from './utils';
|
||||
import { Helmet } from 'umi';
|
||||
|
||||
export function CollectionIndex(props) {
|
||||
const { lastPage } = props;
|
||||
@ -11,6 +12,9 @@ export function CollectionIndex(props) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
<title>{title}</title>
|
||||
</Helmet>
|
||||
<PageHeader
|
||||
ghost={false}
|
||||
title={title}
|
||||
|
@ -5,6 +5,7 @@ import { getPathName, redirectTo } from './utils';
|
||||
import api from '@/api-client';
|
||||
import { useRequest } from 'umi';
|
||||
import { Spin } from '@nocobase/client';
|
||||
import { Helmet } from 'umi';
|
||||
|
||||
export function CollectionSingle(props) {
|
||||
console.log(props);
|
||||
@ -26,6 +27,9 @@ export function CollectionSingle(props) {
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
<title>{data.pageTitle}</title>
|
||||
</Helmet>
|
||||
<PageHeader
|
||||
ghost={false}
|
||||
onBack={() => {
|
||||
|
@ -1,12 +1,17 @@
|
||||
import React from 'react';
|
||||
import { PageHeader } from 'antd';
|
||||
import './style.less';
|
||||
import { Helmet } from 'umi';
|
||||
|
||||
export function Page(props: any) {
|
||||
const { children, ...restProps } = props;
|
||||
const { title, children, ...restProps } = props;
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
<title>{title}</title>
|
||||
</Helmet>
|
||||
<PageHeader
|
||||
title={title}
|
||||
ghost={false}
|
||||
{...restProps}
|
||||
/>
|
||||
|
@ -2,10 +2,14 @@ import React from 'react';
|
||||
import { Link } from 'umi';
|
||||
import { Page } from '@/components/pages';
|
||||
import ViewFactory from '@/components/views';
|
||||
import { Helmet } from 'umi';
|
||||
|
||||
export default (props: any) => {
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
<title>{'登录 NocoBase'}</title>
|
||||
</Helmet>
|
||||
<ViewFactory
|
||||
{...props}
|
||||
viewName={'login'}
|
||||
|
@ -2,10 +2,14 @@ import React from 'react';
|
||||
import { Link } from 'umi';
|
||||
import { Page } from '@/components/pages';
|
||||
import ViewFactory from '@/components/views';
|
||||
import { Helmet } from 'umi';
|
||||
|
||||
export default (props: any) => {
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
<title>{'注册 NocoBase'}</title>
|
||||
</Helmet>
|
||||
<ViewFactory
|
||||
{...props}
|
||||
viewName={'register'}
|
||||
|
Loading…
Reference in New Issue
Block a user