raise-common-lib 0.0.138 → 0.0.140
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/bundles/raise-common-lib.umd.js +37 -3
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +1 -1
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/layout/main-container/index.component.js +1 -1
- package/esm2015/lib/layout/multi-tab/index.component.js +36 -3
- package/esm5/lib/layout/main-container/index.component.js +1 -1
- package/esm5/lib/layout/multi-tab/index.component.js +37 -3
- package/fesm2015/raise-common-lib.js +36 -3
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +37 -3
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/layout/multi-tab/index.component.d.ts +2 -0
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
- package/src/assets/style/reset/grid.scss +4 -0
|
@@ -3328,6 +3328,8 @@
|
|
|
3328
3328
|
//只能单个缓存的url
|
|
3329
3329
|
this.noGenerateTabUrls = []; //不生成tab的url
|
|
3330
3330
|
//不生成tab的url
|
|
3331
|
+
this.flattenMenu = [];
|
|
3332
|
+
this.defaultTabUrl = "";
|
|
3331
3333
|
this.onRefreshTab = new core.EventEmitter();
|
|
3332
3334
|
this.subscriptions = [];
|
|
3333
3335
|
this.TAB_WIDTH = 164;
|
|
@@ -3412,12 +3414,12 @@
|
|
|
3412
3414
|
/** @type {?} */
|
|
3413
3415
|
var navigationInfo = JSON.parse(sessionStorage.getItem("navigationInfo") || "{}");
|
|
3414
3416
|
/** @type {?} */
|
|
3415
|
-
var title = (state && state
|
|
3417
|
+
var title = (state && state["title"]) ||
|
|
3416
3418
|
navigationInfo.title ||
|
|
3417
3419
|
navigationInfo.subTitle ||
|
|
3418
3420
|
navigationInfo.name;
|
|
3419
3421
|
/** @type {?} */
|
|
3420
|
-
var noReused = (state && state
|
|
3422
|
+
var noReused = (state && state["noReused"]) || false;
|
|
3421
3423
|
if (currentRoute && !skipLocationChange) {
|
|
3422
3424
|
if (_this.noGenerateTabUrls.includes(_this.urlWithoutQuery(_this.router.url))) {
|
|
3423
3425
|
return; // 排除不生成tab的url
|
|
@@ -3538,6 +3540,8 @@
|
|
|
3538
3540
|
* @return {?}
|
|
3539
3541
|
*/
|
|
3540
3542
|
function () {
|
|
3543
|
+
var _this = this;
|
|
3544
|
+
// console.log("this.flattenMenu", this.flattenMenu);
|
|
3541
3545
|
/** @type {?} */
|
|
3542
3546
|
var TabCache = JSON.parse(sessionStorage.getItem("TabCache"));
|
|
3543
3547
|
this.tabList = TabCache || [];
|
|
@@ -3550,6 +3554,30 @@
|
|
|
3550
3554
|
var url = this.router.url;
|
|
3551
3555
|
this.addTab(url, title);
|
|
3552
3556
|
}
|
|
3557
|
+
else {
|
|
3558
|
+
/** @type {?} */
|
|
3559
|
+
var target = this.flattenMenu.find((/**
|
|
3560
|
+
* @param {?} ele
|
|
3561
|
+
* @return {?}
|
|
3562
|
+
*/
|
|
3563
|
+
function (ele) { return ele.url === _this.router.url; }));
|
|
3564
|
+
if (target) {
|
|
3565
|
+
if (target.url !== this.defaultTabUrl) {
|
|
3566
|
+
/** @type {?} */
|
|
3567
|
+
var defaultTab = this.flattenMenu.find((/**
|
|
3568
|
+
* @param {?} ele
|
|
3569
|
+
* @return {?}
|
|
3570
|
+
*/
|
|
3571
|
+
function (ele) { return ele.url === _this.defaultTabUrl; }));
|
|
3572
|
+
this.tabList.push({
|
|
3573
|
+
url: defaultTab.url,
|
|
3574
|
+
title: defaultTab.label,
|
|
3575
|
+
displayTitle: defaultTab.label,
|
|
3576
|
+
});
|
|
3577
|
+
}
|
|
3578
|
+
this.addTab(target.url, target.label);
|
|
3579
|
+
}
|
|
3580
|
+
}
|
|
3553
3581
|
}
|
|
3554
3582
|
};
|
|
3555
3583
|
/**
|
|
@@ -3796,6 +3824,8 @@
|
|
|
3796
3824
|
MultiTabComponent.propDecorators = {
|
|
3797
3825
|
singleReuseUrls: [{ type: core.Input }],
|
|
3798
3826
|
noGenerateTabUrls: [{ type: core.Input }],
|
|
3827
|
+
flattenMenu: [{ type: core.Input }],
|
|
3828
|
+
defaultTabUrl: [{ type: core.Input }],
|
|
3799
3829
|
onRefreshTab: [{ type: core.Output }],
|
|
3800
3830
|
onResize: [{ type: core.HostListener, args: ["window:resize", ["$event"],] }]
|
|
3801
3831
|
};
|
|
@@ -3809,6 +3839,10 @@
|
|
|
3809
3839
|
/** @type {?} */
|
|
3810
3840
|
MultiTabComponent.prototype.noGenerateTabUrls;
|
|
3811
3841
|
/** @type {?} */
|
|
3842
|
+
MultiTabComponent.prototype.flattenMenu;
|
|
3843
|
+
/** @type {?} */
|
|
3844
|
+
MultiTabComponent.prototype.defaultTabUrl;
|
|
3845
|
+
/** @type {?} */
|
|
3812
3846
|
MultiTabComponent.prototype.onRefreshTab;
|
|
3813
3847
|
/**
|
|
3814
3848
|
* @type {?}
|
|
@@ -21297,7 +21331,7 @@
|
|
|
21297
21331
|
{ type: core.Component, args: [{
|
|
21298
21332
|
selector: "rs-main-container",
|
|
21299
21333
|
template: "<div class=\"app-main-container-wrap\">\r\n <div class=\"app-main-container\">\r\n <ng-content select=\"[headerSlot]\"></ng-content>\r\n <div class=\"main-page\">\r\n <div class=\"left-aside\">\r\n <ng-content select=\"[leftAsideSlot]\"></ng-content>\r\n </div>\r\n <div\r\n class=\"right-aside\"\r\n [ngClass]=\"{ isCollapsed: isCollapsed }\"\r\n (click)=\"onRightAsideClick()\"\r\n >\r\n <ng-content select=\"[multiTabSlot]\"></ng-content>\r\n <!-- <rs-multi-tab [singleReuseUrls]=\"singleReuseUrls\"></rs-multi-tab> -->\r\n <div class=\"router-content\">\r\n <rs-drawer #drawer>\r\n <ng-content select=\"[routerSlot]\"></ng-content>\r\n </rs-drawer>\r\n </div>\r\n <rs-footer></rs-footer>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
21300
|
-
styles: [".app-main-container-wrap{width:100%;overflow:auto;height:100vh}@media (max-width:768px){.app-main-container-wrap{height:calc(100vh - 40px)}}.app-main-container{display:flex;flex-direction:column;height:100%;min-width:768px}.app-main-container .main-page{flex:1;height:0;display:flex;background-color:var(--rs-container-bg)}.app-main-container .left-aside{height:100%}.app-main-container .right-aside{width:0;flex:1;display:flex;flex-direction:column;padding-right:12px}.app-main-container .right-aside .router-content{flex:1;overflow:auto;max-width:1886px;width:100%;margin:0 auto}@media (max-width:992px){.app-main-container .right-aside.isCollapsed{position:relative}.app-main-container .right-aside.isCollapsed::after{content:\" \";position:absolute;z-index:5;inset:0;background-color:rgba(0,0,0,.2)}}"]
|
|
21334
|
+
styles: [".app-main-container-wrap{width:100%;overflow:auto;height:100vh}@media (max-width:768px){.app-main-container-wrap{height:calc(100vh - 40px)}}.app-main-container{display:flex;flex-direction:column;height:100%;min-width:768px}.app-main-container .main-page{flex:1;height:0;display:flex;background-color:var(--rs-container-bg)}.app-main-container .left-aside{height:100%}.app-main-container .right-aside{width:0;flex:1;display:flex;flex-direction:column;padding-right:12px}.app-main-container .right-aside .router-content{flex:1;overflow:auto;max-width:1886px;width:100%;margin:0 auto}@media (max-width:992px){.app-main-container .right-aside{padding-left:12px}.app-main-container .right-aside.isCollapsed{position:relative}.app-main-container .right-aside.isCollapsed::after{content:\" \";position:absolute;z-index:5;inset:0;background-color:rgba(0,0,0,.2)}}"]
|
|
21301
21335
|
}] }
|
|
21302
21336
|
];
|
|
21303
21337
|
/** @nocollapse */
|