@bit-sun/business-component 3.0.0-alpha.16 → 3.0.0-alpha.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -12350,17 +12350,11 @@ var DetailWrapper = /*#__PURE__*/React.memo(function (_ref) {
12350
12350
  var menuRoutes = window.top == window ? ((_routes$find = routes.find(function (item) {
12351
12351
  return item.path === '/';
12352
12352
  })) === null || _routes$find === void 0 ? void 0 : _routes$find.routes) || [] : JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.LIMIT_MENU_DATA) || '[]');
12353
- console.log('routes-dhl', routes);
12354
- console.log('top-dhl', window.top == window);
12355
12353
  var breadcrumbNameMap = getMainCrumbNameMap(memoizeOneFormatter(menuRoutes, ''));
12356
- console.log('menuRoutes-dhl', menuRoutes);
12357
12354
  var matchParamsPath = function matchParamsPath(pathname, breadcrumbNameMap) {
12358
12355
  var pathKey = Object.keys(breadcrumbNameMap).find(function (key) {
12359
12356
  return pathToRegexp ? pathToRegexp(key).test(pathname) : false;
12360
12357
  });
12361
- console.log('pathname-dhl', pathname);
12362
- console.log('breadcrumbNameMap-dhl', breadcrumbNameMap);
12363
- console.log('pathKey-dhl', pathKey);
12364
12358
  return pathKey ? breadcrumbNameMap[pathKey] : undefined;
12365
12359
  };
12366
12360
  var getPageTitle = function getPageTitle(pathname) {
package/dist/index.js CHANGED
@@ -12372,17 +12372,11 @@ var DetailWrapper = /*#__PURE__*/React__default['default'].memo(function (_ref)
12372
12372
  var menuRoutes = window.top == window ? ((_routes$find = routes.find(function (item) {
12373
12373
  return item.path === '/';
12374
12374
  })) === null || _routes$find === void 0 ? void 0 : _routes$find.routes) || [] : JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.LIMIT_MENU_DATA) || '[]');
12375
- console.log('routes-dhl', routes);
12376
- console.log('top-dhl', window.top == window);
12377
12375
  var breadcrumbNameMap = getMainCrumbNameMap(memoizeOneFormatter(menuRoutes, ''));
12378
- console.log('menuRoutes-dhl', menuRoutes);
12379
12376
  var matchParamsPath = function matchParamsPath(pathname, breadcrumbNameMap) {
12380
12377
  var pathKey = Object.keys(breadcrumbNameMap).find(function (key) {
12381
12378
  return pathToRegexp ? pathToRegexp(key).test(pathname) : false;
12382
12379
  });
12383
- console.log('pathname-dhl', pathname);
12384
- console.log('breadcrumbNameMap-dhl', breadcrumbNameMap);
12385
- console.log('pathKey-dhl', pathKey);
12386
12380
  return pathKey ? breadcrumbNameMap[pathKey] : undefined;
12387
12381
  };
12388
12382
  var getPageTitle = function getPageTitle(pathname) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-sun/business-component",
3
- "version": "3.0.0-alpha.16",
3
+ "version": "3.0.0-alpha.17",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",
@@ -71,30 +71,19 @@ const DetailWrapper = React.memo(
71
71
  const basePath = window.top == window ? '' : `/${itemPath}`;
72
72
 
73
73
  const menuRoutes =
74
- window.top == window
75
- ? routes.find((item) => item.path === '/')?.routes || []
76
- : JSON.parse(
77
- localStorage.getItem(ENUM.BROWSER_CACHE.LIMIT_MENU_DATA) || '[]',
78
- );
79
- console.log('routes-dhl', routes);
80
- console.log('top-dhl', window.top == window);
81
- const breadcrumbNameMap = getMainCrumbNameMap(
82
- memoizeOneFormatter(menuRoutes, ''),
83
- );
84
- console.log('menuRoutes-dhl', menuRoutes);
85
- const matchParamsPath = (pathname: string, breadcrumbNameMap: object) => {
86
- const pathKey: any = Object.keys(breadcrumbNameMap).find((key) =>
87
- pathToRegexp ? pathToRegexp(key).test(pathname) : false,
88
- );
89
- console.log('pathname-dhl', pathname);
90
- console.log('breadcrumbNameMap-dhl', breadcrumbNameMap);
91
- console.log('pathKey-dhl', pathKey);
92
- return pathKey ? breadcrumbNameMap[pathKey] : undefined;
93
- };
94
-
95
-
96
-
74
+ window.top == window
75
+ ? routes.find((item) => item.path === '/')?.routes || []
76
+ : JSON.parse(localStorage.getItem(ENUM.BROWSER_CACHE.LIMIT_MENU_DATA) || '[]');
97
77
 
78
+ const breadcrumbNameMap = getMainCrumbNameMap(
79
+ memoizeOneFormatter(menuRoutes, ''),
80
+ );
81
+ const matchParamsPath = (pathname: string, breadcrumbNameMap: object) => {
82
+ const pathKey: any = Object.keys(breadcrumbNameMap).find((key) =>
83
+ pathToRegexp ? pathToRegexp(key).test(pathname) : false
84
+ );
85
+ return pathKey ? breadcrumbNameMap[pathKey] : undefined;
86
+ };
98
87
 
99
88
  const getPageTitle = (pathname: string) => {
100
89
  const currRouterData = matchParamsPath(