feat: App多页应用支持面包屑开关 (#4722)

This commit is contained in:
qianxiaofendou 2022-06-28 18:28:19 +08:00 committed by GitHub
parent 7f6dbf3f2b
commit 3b2372202e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,6 +131,10 @@ export interface AppSchema extends BaseSchema {
* css * css
*/ */
className?: SchemaClassName; className?: SchemaClassName;
/**
*
*/
showBreadcrumb?: boolean;
} }
export interface AppProps export interface AppProps
@ -356,7 +360,7 @@ export default class App extends React.Component<AppProps, object> {
} }
render() { render() {
const {className, size, classnames: cx, store, render} = this.props; const {className, size, classnames: cx, store, render, showBreadcrumb = true} = this.props;
return ( return (
<Layout <Layout
@ -368,7 +372,7 @@ export default class App extends React.Component<AppProps, object> {
> >
{store.activePage && store.schema ? ( {store.activePage && store.schema ? (
<> <>
{store.bcn.length ? ( {showBreadcrumb && store.bcn.length ? (
<ul className={cx('AppBcn')}> <ul className={cx('AppBcn')}>
{store.bcn.map((item: any, index: number) => { {store.bcn.map((item: any, index: number) => {
return ( return (