raise-common-lib 0.0.38 → 0.0.39
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 +11 -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 +12 -4
- package/esm5/lib/layout/multi-tab/index.component.js +12 -4
- package/fesm2015/raise-common-lib.js +11 -3
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +11 -3
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/layout/multi-tab/index.component.d.ts +1 -0
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
|
@@ -1856,6 +1856,8 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
1856
1856
|
this.drawer = drawer;
|
|
1857
1857
|
this.routeReuseStrategy = routeReuseStrategy;
|
|
1858
1858
|
this.singleReuseUrls = []; //只能单个缓存的url
|
|
1859
|
+
//只能单个缓存的url
|
|
1860
|
+
this.noGenerateTabUrls = []; //不生成tab的url
|
|
1859
1861
|
this.TAB_WIDTH = 164;
|
|
1860
1862
|
this.GAP_NORMAL = 54;
|
|
1861
1863
|
this.GAP_SMALL = 30;
|
|
@@ -1924,6 +1926,9 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
1924
1926
|
if (_this.tabList.length === 0 && !state) {
|
|
1925
1927
|
return; // 初始化第一个url不加入multi-tab
|
|
1926
1928
|
}
|
|
1929
|
+
if (_this.noGenerateTabUrls.includes(_this.router.url)) {
|
|
1930
|
+
return; // 排除不生成tab的url
|
|
1931
|
+
}
|
|
1927
1932
|
_this.setTab(_this.router.url, currentRoute.snapshot.routeConfig.path, state && state.title);
|
|
1928
1933
|
}
|
|
1929
1934
|
}
|
|
@@ -2096,7 +2101,7 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
2096
2101
|
this.tabList.push({
|
|
2097
2102
|
url: url,
|
|
2098
2103
|
title: title || "default",
|
|
2099
|
-
displayTitle:
|
|
2104
|
+
displayTitle: title,
|
|
2100
2105
|
});
|
|
2101
2106
|
this.selectedTab = this.tabList.length - 1;
|
|
2102
2107
|
this.setEllipsisTitle();
|
|
@@ -2180,8 +2185,8 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
2180
2185
|
MultiTabComponent.decorators = [
|
|
2181
2186
|
{ type: Component, args: [{
|
|
2182
2187
|
selector: "rs-multi-tab",
|
|
2183
|
-
template: "<div class=\"rs-multi-tab\"
|
|
2184
|
-
styles: [".rs-multi-tab{
|
|
2188
|
+
template: "<div class=\"rs-multi-tab\" [ngClass]=\"{ 'border': tabList.length > 0 }\">\r\n <ul>\r\n <ng-container *ngFor=\"let tab of tabList; let i = index\">\r\n <li\r\n [ngClass]=\"selectedTab === i ? 'isSelect' : 'notSelect'\"\r\n (click)=\"changeTab(tab, i)\"\r\n >\r\n <ejs-tooltip\r\n id=\"notSelectTooltip\"\r\n [showTipPointer]=\"false\"\r\n [openDelay]=\"500\"\r\n *ngIf=\"tab.displayTitle !== tab.title; else originText\"\r\n style=\"height: 27px\"\r\n >\r\n <ng-template #content>\r\n <div class=\"tooltip-content\">\r\n {{ tab.title }}\r\n </div>\r\n </ng-template>\r\n <span class=\"tabTitle\">{{ tab.displayTitle }}</span>\r\n </ejs-tooltip>\r\n <ng-template #originText>\r\n <span class=\"tabTitle\">\r\n {{ tab.displayTitle }}\r\n </span>\r\n </ng-template>\r\n <span class=\"img-block\" *ngIf=\"selectedTab !== i\"></span>\r\n <img\r\n *ngIf=\"tabList.length !== 1\"\r\n src=\"../../../assets/img/close-url.svg\"\r\n (click)=\"closeTab(tab, i)\"\r\n />\r\n </li>\r\n </ng-container>\r\n </ul>\r\n <div class=\"refresh-tab\" (click)=\"refreshTab()\" *ngIf=\"tabList.length > 0\">\r\n <img\r\n id=\"loadingIcon\"\r\n alt\r\n class=\"refresh-btn\"\r\n src=\"../../../assets/img/desktop-refresh-btn.svg\"\r\n />\r\n <span>Refresh Current Tab</span>\r\n </div>\r\n</div>\r\n",
|
|
2189
|
+
styles: [".rs-multi-tab{width:100%;display:flex;justify-content:space-between}.rs-multi-tab.border{border-bottom:1px solid #e5eaef}.rs-multi-tab ul{display:flex;margin:0 8px;padding:0;overflow:hidden;height:100%}.rs-multi-tab ul li{max-width:164px;padding:0 12px;display:flex;align-items:center;flex:auto;border:1px solid #e5eaef;border-bottom:none;color:#5f6f81;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:28px;height:28px;background:#f8fafb;vertical-align:top;position:relative;cursor:default}.rs-multi-tab ul li .tabTitle{display:inline-block;white-space:nowrap;font-size:11px;font-family:Arial;font-style:normal;font-weight:400;line-height:16px;transition:width .3s}.rs-multi-tab ul li img{border-radius:4px;padding:4px;margin-left:6px;margin-top:1px;vertical-align:top;cursor:pointer}.rs-multi-tab ul li img:hover{background:#dce8f6}.rs-multi-tab ul li:not(:last-child){border-right:none}.rs-multi-tab ul li:first-of-type{border-top-left-radius:8px}.rs-multi-tab ul li:last-child{border-top-right-radius:8px}.rs-multi-tab ul .isSelect{color:#1f3f5c;background:#fff}.rs-multi-tab ul .notSelect img{display:none}.rs-multi-tab ul .notSelect .img-block{display:inline-block;width:22px}.rs-multi-tab ul .notSelect:hover{color:#1f3f5c;background-color:rgba(31,123,255,.04)}.rs-multi-tab ul .notSelect:hover .img-block{display:none}.rs-multi-tab ul .notSelect:hover img{display:inline-block}.rs-multi-tab .refresh-tab{cursor:pointer;text-align:right;color:#6c7c90;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:28px;padding-right:12px}.rs-multi-tab .refresh-tab img{vertical-align:middle;margin-right:4px}.refresh-tab-loading{-webkit-animation:1s linear infinite spin;animation:1s linear infinite spin}@-webkit-keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.tooltip-content{padding:4px;color:#f8fafb;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:14px}@media (max-width:1400px){.refresh-tab{padding-right:0!important}.refresh-tab span{display:none!important}}@media (max-width:1100px){.rs-multi-tab ul li img{position:absolute;right:3px;background-color:#fff}.notSelect:hover img{position:absolute;right:3px;background-color:#eff5fb}.img-block{display:none!important}}@media (max-width:600px){.rs-multi-tab ul li{padding:0 8px}.rs-multi-tab ul .notSelect .img-block{width:0!important}}"]
|
|
2185
2190
|
}] }
|
|
2186
2191
|
];
|
|
2187
2192
|
/** @nocollapse */
|
|
@@ -2195,6 +2200,7 @@ var MultiTabComponent = /** @class */ (function () {
|
|
|
2195
2200
|
]; };
|
|
2196
2201
|
MultiTabComponent.propDecorators = {
|
|
2197
2202
|
singleReuseUrls: [{ type: Input }],
|
|
2203
|
+
noGenerateTabUrls: [{ type: Input }],
|
|
2198
2204
|
onResize: [{ type: HostListener, args: ["window:resize", ["$event"],] }]
|
|
2199
2205
|
};
|
|
2200
2206
|
return MultiTabComponent;
|
|
@@ -2204,6 +2210,8 @@ if (false) {
|
|
|
2204
2210
|
MultiTabComponent.prototype.keepAlive;
|
|
2205
2211
|
/** @type {?} */
|
|
2206
2212
|
MultiTabComponent.prototype.singleReuseUrls;
|
|
2213
|
+
/** @type {?} */
|
|
2214
|
+
MultiTabComponent.prototype.noGenerateTabUrls;
|
|
2207
2215
|
/**
|
|
2208
2216
|
* @type {?}
|
|
2209
2217
|
* @private
|