raise-common-lib 0.0.51 → 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 +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/multi-tab/index.component.js +18 -1
- package/esm2015/lib/layout/rs-aside/index.component.js +20 -4
- package/esm5/lib/layout/multi-tab/index.component.js +19 -1
- package/esm5/lib/layout/rs-aside/index.component.js +20 -4
- 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 +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
|
// 初始化屏幕宽度
|
|
@@ -2422,6 +2423,21 @@
|
|
|
2422
2423
|
* @return {?}
|
|
2423
2424
|
*/
|
|
2424
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);
|
|
2425
2441
|
// this.keepAlive.clearCache(this.tabList[this.selectedTab].url);
|
|
2426
2442
|
// this.drawer.deleteCache(this.tabList[this.selectedTab].url);
|
|
2427
2443
|
/** @type {?} */
|
|
@@ -2502,6 +2518,8 @@
|
|
|
2502
2518
|
/** @type {?} */
|
|
2503
2519
|
MultiTabComponent.prototype.screenWidth;
|
|
2504
2520
|
/** @type {?} */
|
|
2521
|
+
MultiTabComponent.prototype.timer;
|
|
2522
|
+
/** @type {?} */
|
|
2505
2523
|
MultiTabComponent.prototype.router;
|
|
2506
2524
|
/** @type {?} */
|
|
2507
2525
|
MultiTabComponent.prototype.cf;
|
|
@@ -19748,6 +19766,7 @@
|
|
|
19748
19766
|
this.isCollapsed = false; // 接收输入属性
|
|
19749
19767
|
// 接收输入属性
|
|
19750
19768
|
this.navList = [];
|
|
19769
|
+
this.relationStart = [];
|
|
19751
19770
|
this.currentNav = "";
|
|
19752
19771
|
}
|
|
19753
19772
|
/**
|
|
@@ -19770,7 +19789,19 @@
|
|
|
19770
19789
|
* @return {?}
|
|
19771
19790
|
*/
|
|
19772
19791
|
function () {
|
|
19773
|
-
|
|
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
|
+
}
|
|
19774
19805
|
}));
|
|
19775
19806
|
};
|
|
19776
19807
|
/**
|
|
@@ -19792,7 +19823,7 @@
|
|
|
19792
19823
|
};
|
|
19793
19824
|
RSAsideComponent.decorators = [
|
|
19794
19825
|
{ type: core.Component, args: [{
|
|
19795
|
-
selector: "
|
|
19826
|
+
selector: "kt-aside",
|
|
19796
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",
|
|
19797
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}}"]
|
|
19798
19829
|
}] }
|
|
@@ -19804,7 +19835,8 @@
|
|
|
19804
19835
|
RSAsideComponent.propDecorators = {
|
|
19805
19836
|
toggleMenu: [{ type: core.Output }],
|
|
19806
19837
|
isCollapsed: [{ type: core.Input }],
|
|
19807
|
-
navList: [{ type: core.Input }]
|
|
19838
|
+
navList: [{ type: core.Input }],
|
|
19839
|
+
relationStart: [{ type: core.Input }]
|
|
19808
19840
|
};
|
|
19809
19841
|
return RSAsideComponent;
|
|
19810
19842
|
}());
|
|
@@ -19816,6 +19848,8 @@
|
|
|
19816
19848
|
/** @type {?} */
|
|
19817
19849
|
RSAsideComponent.prototype.navList;
|
|
19818
19850
|
/** @type {?} */
|
|
19851
|
+
RSAsideComponent.prototype.relationStart;
|
|
19852
|
+
/** @type {?} */
|
|
19819
19853
|
RSAsideComponent.prototype.currentNav;
|
|
19820
19854
|
/** @type {?} */
|
|
19821
19855
|
RSAsideComponent.prototype.router;
|