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
|
@@ -1911,6 +1911,7 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
1911
1911
|
this.selectedTab = 0;
|
|
1912
1912
|
this.maxTabs = 10;
|
|
1913
1913
|
this.screenWidth = window.innerWidth; // 初始化屏幕宽度
|
|
1914
|
+
this.timer = null;
|
|
1914
1915
|
this.keepAlive = (/** @type {?} */ (this.routeReuseStrategy));
|
|
1915
1916
|
}
|
|
1916
1917
|
// 初始化屏幕宽度
|
|
@@ -1984,7 +1985,9 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
1984
1985
|
if (_this.noGenerateTabUrls.includes(_this.router.url)) {
|
|
1985
1986
|
return; // 排除不生成tab的url
|
|
1986
1987
|
}
|
|
1987
|
-
|
|
1988
|
+
/** @type {?} */
|
|
1989
|
+
var urlWithoutQuery = _this.router.url.split('?')[0];
|
|
1990
|
+
_this.setTab(urlWithoutQuery, currentRoute.snapshot.routeConfig.path, title);
|
|
1988
1991
|
}
|
|
1989
1992
|
}
|
|
1990
1993
|
})));
|
|
@@ -2225,6 +2228,21 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
2225
2228
|
* @return {?}
|
|
2226
2229
|
*/
|
|
2227
2230
|
function () {
|
|
2231
|
+
var _this = this;
|
|
2232
|
+
/** @type {?} */
|
|
2233
|
+
var loadingIcon = document.getElementById("loadingIcon");
|
|
2234
|
+
loadingIcon.classList.add("refresh-tab-loading");
|
|
2235
|
+
if (this.timer) {
|
|
2236
|
+
clearInterval(this.timer);
|
|
2237
|
+
}
|
|
2238
|
+
// 模拟加载过程,1秒后移除动画
|
|
2239
|
+
this.timer = setTimeout((/**
|
|
2240
|
+
* @return {?}
|
|
2241
|
+
*/
|
|
2242
|
+
function () {
|
|
2243
|
+
loadingIcon.classList.remove("refresh-tab-loading");
|
|
2244
|
+
_this.timer = null;
|
|
2245
|
+
}), 1500);
|
|
2228
2246
|
// this.keepAlive.clearCache(this.tabList[this.selectedTab].url);
|
|
2229
2247
|
// this.drawer.deleteCache(this.tabList[this.selectedTab].url);
|
|
2230
2248
|
/** @type {?} */
|
|
@@ -2305,6 +2323,8 @@ if (false) {
|
|
|
2305
2323
|
/** @type {?} */
|
|
2306
2324
|
MultiTabComponent.prototype.screenWidth;
|
|
2307
2325
|
/** @type {?} */
|
|
2326
|
+
MultiTabComponent.prototype.timer;
|
|
2327
|
+
/** @type {?} */
|
|
2308
2328
|
MultiTabComponent.prototype.router;
|
|
2309
2329
|
/** @type {?} */
|
|
2310
2330
|
MultiTabComponent.prototype.cf;
|
|
@@ -19551,6 +19571,7 @@ var RSAsideComponent = /** @class */ (function () {
|
|
|
19551
19571
|
this.isCollapsed = false; // 接收输入属性
|
|
19552
19572
|
// 接收输入属性
|
|
19553
19573
|
this.navList = [];
|
|
19574
|
+
this.relationStart = [];
|
|
19554
19575
|
this.currentNav = "";
|
|
19555
19576
|
}
|
|
19556
19577
|
/**
|
|
@@ -19573,7 +19594,19 @@ var RSAsideComponent = /** @class */ (function () {
|
|
|
19573
19594
|
* @return {?}
|
|
19574
19595
|
*/
|
|
19575
19596
|
function () {
|
|
19576
|
-
|
|
19597
|
+
// console.log('this.router.url', this.router.url)
|
|
19598
|
+
/** @type {?} */
|
|
19599
|
+
var idx = _this.relationStart.findIndex((/**
|
|
19600
|
+
* @param {?} item
|
|
19601
|
+
* @return {?}
|
|
19602
|
+
*/
|
|
19603
|
+
function (item) { return _this.router.url.startsWith(item.url); }));
|
|
19604
|
+
if (idx !== -1) {
|
|
19605
|
+
_this.currentNav = _this.relationStart[idx].target;
|
|
19606
|
+
}
|
|
19607
|
+
else {
|
|
19608
|
+
_this.currentNav = _this.router.url;
|
|
19609
|
+
}
|
|
19577
19610
|
}));
|
|
19578
19611
|
};
|
|
19579
19612
|
/**
|
|
@@ -19595,7 +19628,7 @@ var RSAsideComponent = /** @class */ (function () {
|
|
|
19595
19628
|
};
|
|
19596
19629
|
RSAsideComponent.decorators = [
|
|
19597
19630
|
{ type: Component, args: [{
|
|
19598
|
-
selector: "
|
|
19631
|
+
selector: "kt-aside",
|
|
19599
19632
|
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",
|
|
19600
19633
|
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}}"]
|
|
19601
19634
|
}] }
|
|
@@ -19607,7 +19640,8 @@ var RSAsideComponent = /** @class */ (function () {
|
|
|
19607
19640
|
RSAsideComponent.propDecorators = {
|
|
19608
19641
|
toggleMenu: [{ type: Output }],
|
|
19609
19642
|
isCollapsed: [{ type: Input }],
|
|
19610
|
-
navList: [{ type: Input }]
|
|
19643
|
+
navList: [{ type: Input }],
|
|
19644
|
+
relationStart: [{ type: Input }]
|
|
19611
19645
|
};
|
|
19612
19646
|
return RSAsideComponent;
|
|
19613
19647
|
}());
|
|
@@ -19619,6 +19653,8 @@ if (false) {
|
|
|
19619
19653
|
/** @type {?} */
|
|
19620
19654
|
RSAsideComponent.prototype.navList;
|
|
19621
19655
|
/** @type {?} */
|
|
19656
|
+
RSAsideComponent.prototype.relationStart;
|
|
19657
|
+
/** @type {?} */
|
|
19622
19658
|
RSAsideComponent.prototype.currentNav;
|
|
19623
19659
|
/** @type {?} */
|
|
19624
19660
|
RSAsideComponent.prototype.router;
|