@bit-sun/business-component 3.0.0-alpha.25 → 3.0.0-alpha.26
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 +8 -8
- package/dist/index.js +8 -8
- package/package.json +1 -1
- package/src/utils/LocalstorageUtils.ts +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -514,12 +514,11 @@ function _objectDestructuringEmpty(obj) {
|
|
|
514
514
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
515
515
|
if (source == null) return {};
|
|
516
516
|
var target = {};
|
|
517
|
-
var
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
target[key] = source[key];
|
|
517
|
+
for (var key in source) {
|
|
518
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
519
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
520
|
+
target[key] = source[key];
|
|
521
|
+
}
|
|
523
522
|
}
|
|
524
523
|
return target;
|
|
525
524
|
}
|
|
@@ -706,10 +705,11 @@ var getMenuAuthDataKey = function getMenuAuthDataKey(channel) {
|
|
|
706
705
|
// 传入channel 则使用传入的channel 作为前缀,一般存储key使用
|
|
707
706
|
// 否则使用下面页面路径处理后的变量为前缀,一般获取key使用
|
|
708
707
|
if (!channel) {
|
|
709
|
-
var
|
|
708
|
+
var _window$top, _window$top$location;
|
|
709
|
+
var channelPlat = (_window$top = window.top) === null || _window$top === void 0 ? void 0 : (_window$top$location = _window$top.location) === null || _window$top$location === void 0 ? void 0 : _window$top$location.pathname;
|
|
710
710
|
var defaultPrefix = 'CONFIG_PC';
|
|
711
711
|
var mapping = ENUM.MAIN_AUTH_MAPPING;
|
|
712
|
-
prefix = (mapping === null || mapping === void 0 ? void 0 : mapping[channelPlat]) || defaultPrefix;
|
|
712
|
+
prefix = channelPlat && (mapping === null || mapping === void 0 ? void 0 : mapping[channelPlat]) || defaultPrefix;
|
|
713
713
|
}
|
|
714
714
|
return "".concat(prefix, ":").concat(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES);
|
|
715
715
|
};
|
package/dist/index.js
CHANGED
|
@@ -537,12 +537,11 @@ function _objectDestructuringEmpty(obj) {
|
|
|
537
537
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
538
538
|
if (source == null) return {};
|
|
539
539
|
var target = {};
|
|
540
|
-
var
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
target[key] = source[key];
|
|
540
|
+
for (var key in source) {
|
|
541
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
542
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
543
|
+
target[key] = source[key];
|
|
544
|
+
}
|
|
546
545
|
}
|
|
547
546
|
return target;
|
|
548
547
|
}
|
|
@@ -729,10 +728,11 @@ var getMenuAuthDataKey = function getMenuAuthDataKey(channel) {
|
|
|
729
728
|
// 传入channel 则使用传入的channel 作为前缀,一般存储key使用
|
|
730
729
|
// 否则使用下面页面路径处理后的变量为前缀,一般获取key使用
|
|
731
730
|
if (!channel) {
|
|
732
|
-
var
|
|
731
|
+
var _window$top, _window$top$location;
|
|
732
|
+
var channelPlat = (_window$top = window.top) === null || _window$top === void 0 ? void 0 : (_window$top$location = _window$top.location) === null || _window$top$location === void 0 ? void 0 : _window$top$location.pathname;
|
|
733
733
|
var defaultPrefix = 'CONFIG_PC';
|
|
734
734
|
var mapping = ENUM.MAIN_AUTH_MAPPING;
|
|
735
|
-
prefix = (mapping === null || mapping === void 0 ? void 0 : mapping[channelPlat]) || defaultPrefix;
|
|
735
|
+
prefix = channelPlat && (mapping === null || mapping === void 0 ? void 0 : mapping[channelPlat]) || defaultPrefix;
|
|
736
736
|
}
|
|
737
737
|
return "".concat(prefix, ":").concat(ENUM.BROWSER_CACHE.MAIN_AUTH_CODES);
|
|
738
738
|
};
|
package/package.json
CHANGED
|
@@ -101,10 +101,10 @@ export const getMenuAuthDataKey = (channel?: string) => {
|
|
|
101
101
|
// 传入channel 则使用传入的channel 作为前缀,一般存储key使用
|
|
102
102
|
// 否则使用下面页面路径处理后的变量为前缀,一般获取key使用
|
|
103
103
|
if(!channel) {
|
|
104
|
-
const channelPlat: string = window.location
|
|
104
|
+
const channelPlat: string | undefined = window.top?.location?.pathname
|
|
105
105
|
const defaultPrefix = 'CONFIG_PC';
|
|
106
106
|
const mapping: any = ENUM.MAIN_AUTH_MAPPING;
|
|
107
|
-
prefix = mapping?.[channelPlat] || defaultPrefix
|
|
107
|
+
prefix = channelPlat && mapping?.[channelPlat] || defaultPrefix
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
return `${prefix}:${ENUM.BROWSER_CACHE.MAIN_AUTH_CODES}`
|