mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 10:46:54 +00:00
fix: do not display the page title
This commit is contained in:
parent
7e76c54012
commit
95f4406ba9
@ -25,12 +25,12 @@ import { Spin } from 'antd';
|
||||
import 'antd/dist/antd.css';
|
||||
import React from 'react';
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import { Link, MemoryRouter, NavLink } from 'react-router-dom';
|
||||
import { Link, NavLink } from 'react-router-dom';
|
||||
import apiClient from './apiClient';
|
||||
|
||||
const providers = [
|
||||
// [HashRouter],
|
||||
[MemoryRouter, { initialEntries: ['/'] }],
|
||||
// [MemoryRouter, { initialEntries: ['/'] }],
|
||||
[APIClientProvider, { apiClient }],
|
||||
[I18nextProvider, { i18n }],
|
||||
[AntdConfigProvider, { remoteLocale: true }],
|
||||
|
@ -3,6 +3,7 @@ import React, { useRef, useState } from 'react';
|
||||
import { useHistory, useRouteMatch } from 'react-router-dom';
|
||||
import {
|
||||
CurrentUser,
|
||||
findByUid,
|
||||
findMenuItem,
|
||||
PluginManager,
|
||||
RemoteSchemaComponent,
|
||||
@ -42,6 +43,10 @@ export function AdminLayout(props: any) {
|
||||
}}
|
||||
onSuccess={(data) => {
|
||||
if (defaultSelectedUid) {
|
||||
const s = findByUid(data?.data, defaultSelectedUid);
|
||||
if (s) {
|
||||
setTitle(s.title);
|
||||
}
|
||||
return;
|
||||
}
|
||||
setHidden(true);
|
||||
|
@ -1,2 +1,3 @@
|
||||
export * from './Menu';
|
||||
export { findMenuItem } from './util';
|
||||
export * from './util';
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
import { Schema, observer, useFieldSchema, useField, RecursionField } from '@formily/react';
|
||||
import { Schema } from '@formily/react';
|
||||
|
||||
function findByUid(schema: Schema, uid: string) {
|
||||
export function findByUid(schema: Schema, uid: string) {
|
||||
if (!Schema.isSchemaInstance(schema)) {
|
||||
schema = new Schema(schema);
|
||||
}
|
||||
return schema.reduceProperties((buffter, s) => {
|
||||
if (s['x-uid'] === uid) {
|
||||
return s;
|
||||
|
Loading…
Reference in New Issue
Block a user