@thefreshop/tb 1.0.30 → 1.1.0
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/cjs/index.js +12 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +13 -7
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -398,12 +398,15 @@ const Tabs = ({ nav: { menuSet, openIcon, closeIcon }, frameStyle }) => {
|
|
|
398
398
|
})));
|
|
399
399
|
};
|
|
400
400
|
|
|
401
|
-
var css_248z$7 = ".main-module_mainFrame__Etjvl{height:100%;width:100%}\n/*# sourceMappingURL=data:application/json;base64,
|
|
402
|
-
var styles$5 = {"mainFrame":"main-module_mainFrame__Etjvl"};
|
|
401
|
+
var css_248z$7 = ".main-module_mainFrame__Etjvl{height:100%;width:100%}.main-module_mainFrameFullscreen__oEwV8{background:#fff;inset:0;overflow:auto;padding:0;position:fixed;z-index:9999}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1haW4ubW9kdWxlLmNzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSw4QkFFSSxXQUFZLENBRFosVUFFSixDQUVBLHdDQU1JLGVBQWdCLENBSmhCLE9BQVEsQ0FHUixhQUFjLENBRGQsU0FBVSxDQUhWLGNBQWUsQ0FFZixZQUlKIiwiZmlsZSI6Im1haW4ubW9kdWxlLmNzcyIsInNvdXJjZXNDb250ZW50IjpbIi5tYWluRnJhbWUge1xyXG4gICAgd2lkdGg6IDEwMCU7XHJcbiAgICBoZWlnaHQ6IDEwMCU7XHJcbn1cclxuXHJcbi5tYWluRnJhbWVGdWxsc2NyZWVuIHtcclxuICAgIHBvc2l0aW9uOiBmaXhlZDtcclxuICAgIGluc2V0OiAwO1xyXG4gICAgei1pbmRleDogOTk5OTtcclxuICAgIHBhZGRpbmc6IDA7XHJcbiAgICBvdmVyZmxvdzogYXV0bztcclxuICAgIGJhY2tncm91bmQ6ICNmZmY7XHJcbn1cclxuIl19 */";
|
|
402
|
+
var styles$5 = {"mainFrame":"main-module_mainFrame__Etjvl","mainFrameFullscreen":"main-module_mainFrameFullscreen__oEwV8"};
|
|
403
403
|
styleInject(css_248z$7);
|
|
404
404
|
|
|
405
405
|
const Main = () => {
|
|
406
|
-
|
|
406
|
+
const [sp] = reactRouter.useSearchParams();
|
|
407
|
+
const isFs = sp.get("fs") === "1" || sp.get("fullscreen") === "1";
|
|
408
|
+
// console.log("Main render, isFs:", isFs);
|
|
409
|
+
return (React.createElement("div", { className: isFs ? styles$5.mainFrameFullscreen : styles$5.mainFrame },
|
|
407
410
|
React.createElement(reactRouter.Outlet, null)));
|
|
408
411
|
};
|
|
409
412
|
|
|
@@ -498,7 +501,7 @@ const NullPage = () => {
|
|
|
498
501
|
};
|
|
499
502
|
|
|
500
503
|
const TbFrame = ({ setting, top, bottom, nav, top_banner, hashmode = false, frameStyle, }) => {
|
|
501
|
-
const { user, errMsg, tabList, setTabList, startTabKey, setStartTabKey } = useTbState();
|
|
504
|
+
const { user, errMsg, tabList, setTabList, startTabKey, setStartTabKey, loginUser } = useTbState();
|
|
502
505
|
React.useEffect(() => {
|
|
503
506
|
let p_tabList = [];
|
|
504
507
|
nav.menuSet.forEach((item) => {
|
|
@@ -512,8 +515,11 @@ const TbFrame = ({ setting, top, bottom, nav, top_banner, hashmode = false, fram
|
|
|
512
515
|
nav?.globalTabs?.forEach((item) => {
|
|
513
516
|
p_tabList.push(item);
|
|
514
517
|
});
|
|
515
|
-
|
|
516
|
-
|
|
518
|
+
const isSameTabs = tabList.length === p_tabList.length && tabList.every((tab, idx) => tab.key === p_tabList[idx]?.key);
|
|
519
|
+
if (!isSameTabs) {
|
|
520
|
+
setTabList(p_tabList);
|
|
521
|
+
}
|
|
522
|
+
}, [nav.menuSet, nav.globalTabs, tabList, setTabList]);
|
|
517
523
|
React.useEffect(() => {
|
|
518
524
|
if (!errMsg?.isPopup) ;
|
|
519
525
|
}, [errMsg]);
|