raise-common-lib 0.0.50 → 0.0.52
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 +40 -4
- 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/multi-tab/index.component.js +21 -2
- package/esm2015/lib/layout/rs-aside/index.component.js +20 -4
- package/esm5/lib/layout/multi-tab/index.component.js +22 -2
- package/esm5/lib/layout/rs-aside/index.component.js +20 -4
- package/fesm2015/raise-common-lib.js +39 -4
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +40 -4
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/layout/multi-tab/index.component.d.ts +1 -0
- package/lib/layout/rs-aside/index.component.d.ts +1 -0
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
|
@@ -2106,6 +2106,7 @@
|
|
|
2106
2106
|
this.selectedTab = 0;
|
|
2107
2107
|
this.maxTabs = 10;
|
|
2108
2108
|
this.screenWidth = window.innerWidth; // 初始化屏幕宽度
|
|
2109
|
+
this.timer = null;
|
|
2109
2110
|
this.keepAlive = (/** @type {?} */ (this.routeReuseStrategy));
|
|
2110
2111
|
}
|
|
2111
2112
|
// 初始化屏幕宽度
|
|
@@ -2179,7 +2180,9 @@
|
|
|
2179
2180
|
if (_this.noGenerateTabUrls.includes(_this.router.url)) {
|
|
2180
2181
|
return; // 排除不生成tab的url
|
|
2181
2182
|
}
|
|
2182
|
-
|
|
2183
|
+
/** @type {?} */
|
|
2184
|
+
var urlWithoutQuery = _this.router.url.split('?')[0];
|
|
2185
|
+
_this.setTab(urlWithoutQuery, currentRoute.snapshot.routeConfig.path, title);
|
|
2183
2186
|
}
|
|
2184
2187
|
}
|
|
2185
2188
|
})));
|
|
@@ -2420,6 +2423,21 @@
|
|
|
2420
2423
|
* @return {?}
|
|
2421
2424
|
*/
|
|
2422
2425
|
function () {
|
|
2426
|
+
var _this = this;
|
|
2427
|
+
/** @type {?} */
|
|
2428
|
+
var loadingIcon = document.getElementById("loadingIcon");
|
|
2429
|
+
loadingIcon.classList.add("refresh-tab-loading");
|
|
2430
|
+
if (this.timer) {
|
|
2431
|
+
clearInterval(this.timer);
|
|
2432
|
+
}
|
|
2433
|
+
// 模拟加载过程,1秒后移除动画
|
|
2434
|
+
this.timer = setTimeout((/**
|
|
2435
|
+
* @return {?}
|
|
2436
|
+
*/
|
|
2437
|
+
function () {
|
|
2438
|
+
loadingIcon.classList.remove("refresh-tab-loading");
|
|
2439
|
+
_this.timer = null;
|
|
2440
|
+
}), 1500);
|
|
2423
2441
|
// this.keepAlive.clearCache(this.tabList[this.selectedTab].url);
|
|
2424
2442
|
// this.drawer.deleteCache(this.tabList[this.selectedTab].url);
|
|
2425
2443
|
/** @type {?} */
|
|
@@ -2500,6 +2518,8 @@
|
|
|
2500
2518
|
/** @type {?} */
|
|
2501
2519
|
MultiTabComponent.prototype.screenWidth;
|
|
2502
2520
|
/** @type {?} */
|
|
2521
|
+
MultiTabComponent.prototype.timer;
|
|
2522
|
+
/** @type {?} */
|
|
2503
2523
|
MultiTabComponent.prototype.router;
|
|
2504
2524
|
/** @type {?} */
|
|
2505
2525
|
MultiTabComponent.prototype.cf;
|
|
@@ -19746,6 +19766,7 @@
|
|
|
19746
19766
|
this.isCollapsed = false; // 接收输入属性
|
|
19747
19767
|
// 接收输入属性
|
|
19748
19768
|
this.navList = [];
|
|
19769
|
+
this.relationStart = [];
|
|
19749
19770
|
this.currentNav = "";
|
|
19750
19771
|
}
|
|
19751
19772
|
/**
|
|
@@ -19768,7 +19789,19 @@
|
|
|
19768
19789
|
* @return {?}
|
|
19769
19790
|
*/
|
|
19770
19791
|
function () {
|
|
19771
|
-
|
|
19792
|
+
// console.log('this.router.url', this.router.url)
|
|
19793
|
+
/** @type {?} */
|
|
19794
|
+
var idx = _this.relationStart.findIndex((/**
|
|
19795
|
+
* @param {?} item
|
|
19796
|
+
* @return {?}
|
|
19797
|
+
*/
|
|
19798
|
+
function (item) { return _this.router.url.startsWith(item.url); }));
|
|
19799
|
+
if (idx !== -1) {
|
|
19800
|
+
_this.currentNav = _this.relationStart[idx].target;
|
|
19801
|
+
}
|
|
19802
|
+
else {
|
|
19803
|
+
_this.currentNav = _this.router.url;
|
|
19804
|
+
}
|
|
19772
19805
|
}));
|
|
19773
19806
|
};
|
|
19774
19807
|
/**
|
|
@@ -19790,7 +19823,7 @@
|
|
|
19790
19823
|
};
|
|
19791
19824
|
RSAsideComponent.decorators = [
|
|
19792
19825
|
{ type: core.Component, args: [{
|
|
19793
|
-
selector: "
|
|
19826
|
+
selector: "kt-aside",
|
|
19794
19827
|
template: "<div class=\"rs-aside\" [ngClass]=\"{ isCollapsed: isCollapsed }\">\r\n <div class=\"nav-list\">\r\n <div class=\"nav-group\" [ngClass]=\"group.class\" *ngFor=\"let group of navList\">\r\n <div\r\n class=\"nav-item\"\r\n [ngClass]=\"{ isCurrent: currentNav === nav.url }\"\r\n *ngFor=\"let nav of group.navItems\"\r\n (click)=\"onNavClick(nav)\"\r\n >\r\n <div class=\"nav-item-inner\">\r\n <mat-icon class=\"menu-icon\" [svgIcon]=\"nav.iconCode\"></mat-icon>\r\n <span class=\"nav-text\" [ngClass]=\"{ isCollapsed: isCollapsed }\">{{\r\n nav.label\r\n }}</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"bottom-iconbox\" [ngClass]=\"{ isCollapsed: isCollapsed }\">\r\n <ng-content select=\"[bottomIconBox]\"></ng-content>\r\n </div>\r\n</div>\r\n",
|
|
19795
19828
|
styles: [".rs-aside{display:flex;flex-direction:column;height:100%;width:240px;will-change:width;transition:width .3s;padding-right:16px}.rs-aside.isCollapsed{width:64px;padding-right:0}.rs-aside .nav-list{padding-top:12px;flex:1;overflow:auto;height:0}.rs-aside .nav-list .nav-item{height:32px;cursor:pointer;padding-left:11px}.rs-aside .nav-list .nav-item .nav-item-inner{display:flex;align-items:center;padding:8px 8px 8px 12px}.rs-aside .nav-list .nav-item .nav-item-inner ::ng-deep .menu-icon{width:33px;height:16px;display:flex;align-items:center}.rs-aside .nav-list .nav-item .nav-item-inner ::ng-deep .menu-icon svg{width:16px;height:16px;color:#6c7c90;stroke:#6c7c90}.rs-aside .nav-list .nav-item:hover .nav-item-inner{border-radius:6px;background:rgba(31,123,255,.04)}.rs-aside .nav-list .nav-item:hover .nav-item-inner ::ng-deep .menu-icon svg{color:#44566c;stroke:#44566c}.rs-aside .nav-list .nav-item .nav-text{color:#5f6f81;font-family:Arial;font-size:12px;font-weight:400;line-height:16px;transition:.3s;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:relative;top:1px}@media (min-width:992px){.rs-aside .nav-list .nav-item .nav-text.isCollapsed{opacity:0;width:0}}.rs-aside .nav-list .nav-item.isCurrent{position:relative}.rs-aside .nav-list .nav-item.isCurrent .nav-text{color:#44566c;font-weight:700}.rs-aside .nav-list .nav-item.isCurrent::before{content:\"\";position:absolute;left:4px;top:8px;width:3px;height:16px;background-color:#1364b3;border-radius:2px}.rs-aside .bottom-iconbox{padding:12px 20px;height:48px;display:flex;gap:12px}.rs-aside .bottom-iconbox ::ng-deep .menu-bottom-icon{width:24px;height:24px;display:flex;justify-content:center;align-items:center;border:1px solid #eaedf0;border-radius:24px;cursor:pointer}.rs-aside .bottom-iconbox ::ng-deep .menu-bottom-icon svg{width:16px;height:16px;color:#6c7c90;stroke:#6c7c90}.rs-aside .bottom-iconbox ::ng-deep .menu-bottom-icon.disabled{cursor:default;opacity:.5}.rs-aside .bottom-iconbox ::ng-deep .menu-bottom-icon:not(.disabled):hover{background-color:#fff}.rs-aside .bottom-iconbox ::ng-deep .menu-bottom-icon:not(.disabled):hover svg{color:#1f7bff;stroke:#1f7bff}@media (min-width:992px){.rs-aside .bottom-iconbox.isCollapsed{flex-direction:column;height:auto}}@media (max-width:992px){.rs-aside{width:0;overflow:hidden;position:absolute;height:calc(100% - 50px);z-index:10;background-color:var(--rs-container-bg);padding-right:0}.rs-aside.isCollapsed{width:240px;padding-right:16px}}"]
|
|
19796
19829
|
}] }
|
|
@@ -19802,7 +19835,8 @@
|
|
|
19802
19835
|
RSAsideComponent.propDecorators = {
|
|
19803
19836
|
toggleMenu: [{ type: core.Output }],
|
|
19804
19837
|
isCollapsed: [{ type: core.Input }],
|
|
19805
|
-
navList: [{ type: core.Input }]
|
|
19838
|
+
navList: [{ type: core.Input }],
|
|
19839
|
+
relationStart: [{ type: core.Input }]
|
|
19806
19840
|
};
|
|
19807
19841
|
return RSAsideComponent;
|
|
19808
19842
|
}());
|
|
@@ -19814,6 +19848,8 @@
|
|
|
19814
19848
|
/** @type {?} */
|
|
19815
19849
|
RSAsideComponent.prototype.navList;
|
|
19816
19850
|
/** @type {?} */
|
|
19851
|
+
RSAsideComponent.prototype.relationStart;
|
|
19852
|
+
/** @type {?} */
|
|
19817
19853
|
RSAsideComponent.prototype.currentNav;
|
|
19818
19854
|
/** @type {?} */
|
|
19819
19855
|
RSAsideComponent.prototype.router;
|