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