ant-design/53528292-async.26664686.js
2024-11-20 18:30:54 +00:00

1 line
5.5 KiB
JavaScript

(("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd=("undefined"!=typeof globalThis?globalThis:self).makoChunk_antd||[]).push([["53528292"],{53528292:function(e,a,t){"use strict";t.d(a,"__esModule",{value:!0}),t.d(a,"texts",{enumerable:!0,get:function(){return n;}}),t("1c4989cd");let n=[{value:"When the system has more than two layers in a hierarchy.",paraId:0,tocIndex:0},{value:"When you need to inform the user of where they are.",paraId:0,tocIndex:0},{value:"When the user may need to navigate back to a higher level.",paraId:0,tocIndex:0},{value:"// works when >=5.3.0, recommended \u2705\nreturn <Breadcrumb items={[{ title: 'sample' }]} />;\n\n// works when <5.3.0, deprecated when >=5.3.0 \u{1F645}\u{1F3FB}\u200D\u2640\uFE0F\nreturn (\n <Breadcrumb>\n <Breadcrumb.Item>sample</Breadcrumb.Item>\n </Breadcrumb>\n);\n\n// or\n\nreturn <Breadcrumb routes={[{ breadcrumbName: 'sample' }]} />;\n",paraId:1,tocIndex:0},{value:"Common props ref\uFF1A",paraId:2,tocIndex:10},{value:"Common props",paraId:3,tocIndex:10},{value:"Property",paraId:4,tocIndex:11},{value:"Description",paraId:4,tocIndex:11},{value:"Type",paraId:4,tocIndex:11},{value:"Default",paraId:4,tocIndex:11},{value:"Version",paraId:4,tocIndex:11},{value:"itemRender",paraId:4,tocIndex:11},{value:"Custom item renderer",paraId:4,tocIndex:11},{value:"(route, params, routes, paths) => ReactNode",paraId:4,tocIndex:11},{value:"-",paraId:4,tocIndex:11},{value:"params",paraId:4,tocIndex:11},{value:"Routing parameters",paraId:4,tocIndex:11},{value:"object",paraId:4,tocIndex:11},{value:"-",paraId:4,tocIndex:11},{value:"items",paraId:4,tocIndex:11},{value:"The routing stack information of router",paraId:4,tocIndex:11},{value:"ItemType[]",paraId:5,tocIndex:11},{value:"-",paraId:4,tocIndex:11},{value:"5.3.0",paraId:4,tocIndex:11},{value:"separator",paraId:4,tocIndex:11},{value:"Custom separator",paraId:4,tocIndex:11},{value:"ReactNode",paraId:4,tocIndex:11},{value:"/",paraId:4,tocIndex:11},{value:"type ItemType = Omit<",paraId:6,tocIndex:12},{value:"RouteItemType",paraId:7,tocIndex:12},{value:", 'title' | 'path'> | ",paraId:6,tocIndex:12},{value:"SeparatorType",paraId:8,tocIndex:12},{value:"Property",paraId:9,tocIndex:13},{value:"Description",paraId:9,tocIndex:13},{value:"Type",paraId:9,tocIndex:13},{value:"Default",paraId:9,tocIndex:13},{value:"Version",paraId:9,tocIndex:13},{value:"className",paraId:9,tocIndex:13},{value:"The additional css class",paraId:9,tocIndex:13},{value:"string",paraId:9,tocIndex:13},{value:"-",paraId:9,tocIndex:13},{value:"dropdownProps",paraId:9,tocIndex:13},{value:"The dropdown props",paraId:9,tocIndex:13},{value:"Dropdown",paraId:10,tocIndex:13},{value:"-",paraId:9,tocIndex:13},{value:"href",paraId:9,tocIndex:13},{value:"Target of hyperlink. Can not work with ",paraId:9,tocIndex:13},{value:"path",paraId:9,tocIndex:13},{value:"string",paraId:9,tocIndex:13},{value:"-",paraId:9,tocIndex:13},{value:"path",paraId:9,tocIndex:13},{value:"Connected path. Each path will connect with prev one. Can not work with ",paraId:9,tocIndex:13},{value:"href",paraId:9,tocIndex:13},{value:"string",paraId:9,tocIndex:13},{value:"-",paraId:9,tocIndex:13},{value:"menu",paraId:9,tocIndex:13},{value:"The menu props",paraId:9,tocIndex:13},{value:"MenuProps",paraId:11,tocIndex:13},{value:"-",paraId:9,tocIndex:13},{value:"4.24.0",paraId:9,tocIndex:13},{value:"onClick",paraId:9,tocIndex:13},{value:"Set the handler to handle click event",paraId:9,tocIndex:13},{value:"(e:MouseEvent) => void",paraId:9,tocIndex:13},{value:"-",paraId:9,tocIndex:13},{value:"title",paraId:9,tocIndex:13},{value:"item name",paraId:9,tocIndex:13},{value:"ReactNode",paraId:9,tocIndex:13},{value:"-",paraId:9,tocIndex:13},{value:"const item = {\n type: 'separator', // Must have\n separator: '/',\n};\n",paraId:12,tocIndex:14},{value:"Property",paraId:13,tocIndex:14},{value:"Description",paraId:13,tocIndex:14},{value:"Type",paraId:13,tocIndex:14},{value:"Default",paraId:13,tocIndex:14},{value:"Version",paraId:13,tocIndex:14},{value:"type",paraId:13,tocIndex:14},{value:"Mark as separator",paraId:13,tocIndex:14},{value:"separator",paraId:13,tocIndex:14},{value:"5.3.0",paraId:13,tocIndex:14},{value:"separator",paraId:13,tocIndex:14},{value:"Custom separator",paraId:13,tocIndex:14},{value:"ReactNode",paraId:13,tocIndex:14},{value:"/",paraId:13,tocIndex:14},{value:"5.3.0",paraId:13,tocIndex:14},{value:"The link of Breadcrumb item targets ",paraId:14,tocIndex:15},{value:"#",paraId:14,tocIndex:15},{value:" by default, you can use ",paraId:14,tocIndex:15},{value:"itemRender",paraId:14,tocIndex:15},{value:" to make a ",paraId:14,tocIndex:15},{value:"browserHistory",paraId:14,tocIndex:15},{value:" Link.",paraId:14,tocIndex:15},{value:"import { Link } from 'react-router';\n\nconst items = [\n {\n path: '/index',\n title: 'home',\n },\n {\n path: '/first',\n title: 'first',\n children: [\n {\n path: '/general',\n title: 'General',\n },\n {\n path: '/layout',\n title: 'Layout',\n },\n {\n path: '/navigation',\n title: 'Navigation',\n },\n ],\n },\n {\n path: '/second',\n title: 'second',\n },\n];\n\nfunction itemRender(currentRoute, params, items, paths) {\n const isLast = currentRoute?.path === items[items.length - 1]?.path;\n\n return isLast ? (\n <span>{currentRoute.title}</span>\n ) : (\n <Link to={`/${paths.join(\"/\")}`}>{currentRoute.title}</Link>\n );\n}\n\nreturn <Breadcrumb itemRender={itemRender} items={items} />;\n",paraId:15,tocIndex:15}];}}]);