@alauda/ui 6.5.9-beta → 6.5.9-beta.0
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/esm2020/tabs/tab-group.component.mjs +3 -14
- package/esm2020/tabs/tab-header.component.mjs +7 -1
- package/esm2020/tooltip/base-tooltip.mjs +17 -9
- package/fesm2015/alauda-ui.mjs +24 -25
- package/fesm2015/alauda-ui.mjs.map +1 -1
- package/fesm2020/alauda-ui.mjs +24 -21
- package/fesm2020/alauda-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/tabs/tab-header.component.d.ts +3 -2
package/fesm2015/alauda-ui.mjs
CHANGED
|
@@ -1597,9 +1597,11 @@ class BaseTooltip {
|
|
|
1597
1597
|
this.componentIns.hide$.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
1598
1598
|
this._disposeTooltip();
|
|
1599
1599
|
});
|
|
1600
|
-
|
|
1601
|
-
.pipe(
|
|
1602
|
-
|
|
1600
|
+
if (!this.disableAnimation) {
|
|
1601
|
+
merge(this.componentIns.beforeHide$, this.componentIns.beforeShow$.pipe(delay(0)))
|
|
1602
|
+
.pipe(takeUntil(this.destroy$))
|
|
1603
|
+
.subscribe(this._updateTransformOrigin.bind(this));
|
|
1604
|
+
}
|
|
1603
1605
|
if (this.trigger === TooltipTrigger.Hover) {
|
|
1604
1606
|
this.componentIns.hover$
|
|
1605
1607
|
.pipe(takeUntil(this.componentIns.destroy$))
|
|
@@ -1644,7 +1646,13 @@ class BaseTooltip {
|
|
|
1644
1646
|
}
|
|
1645
1647
|
hide() {
|
|
1646
1648
|
var _a;
|
|
1647
|
-
(
|
|
1649
|
+
if (this.disableAnimation) {
|
|
1650
|
+
// 如果禁用了动画就立即销毁,而不是等动画完成事件后才销毁
|
|
1651
|
+
this._disposeTooltip();
|
|
1652
|
+
}
|
|
1653
|
+
else {
|
|
1654
|
+
(_a = this.componentIns) === null || _a === void 0 ? void 0 : _a.hide();
|
|
1655
|
+
}
|
|
1648
1656
|
}
|
|
1649
1657
|
updatePosition() {
|
|
1650
1658
|
if (this.overlayRef) {
|
|
@@ -1715,23 +1723,21 @@ class BaseTooltip {
|
|
|
1715
1723
|
});
|
|
1716
1724
|
}
|
|
1717
1725
|
onMouseLeave() {
|
|
1718
|
-
var _a;
|
|
1719
1726
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1720
1727
|
this.hostHovered = false;
|
|
1721
1728
|
yield sleep(HIDDEN_DELAY);
|
|
1722
1729
|
if (!this.tooltipHovered && !this.hostHovered) {
|
|
1723
|
-
|
|
1730
|
+
this.hide();
|
|
1724
1731
|
}
|
|
1725
1732
|
});
|
|
1726
1733
|
}
|
|
1727
1734
|
onTooltipHovered(hovered) {
|
|
1728
|
-
var _a;
|
|
1729
1735
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1730
1736
|
this.tooltipHovered = hovered;
|
|
1731
1737
|
if (!hovered) {
|
|
1732
1738
|
yield sleep(HIDDEN_DELAY);
|
|
1733
1739
|
if (!this.tooltipHovered && !this.hostHovered) {
|
|
1734
|
-
|
|
1740
|
+
this.hide();
|
|
1735
1741
|
}
|
|
1736
1742
|
}
|
|
1737
1743
|
});
|
|
@@ -1740,19 +1746,17 @@ class BaseTooltip {
|
|
|
1740
1746
|
this.toggleTooltip();
|
|
1741
1747
|
}
|
|
1742
1748
|
onBodyClick(event) {
|
|
1743
|
-
var _a;
|
|
1744
1749
|
if (!this.elRef.nativeElement.contains(event.target) &&
|
|
1745
1750
|
(this.hideOnClick ||
|
|
1746
1751
|
!this.componentIns.elRef.nativeElement.contains(event.target))) {
|
|
1747
|
-
|
|
1752
|
+
this.hide();
|
|
1748
1753
|
}
|
|
1749
1754
|
}
|
|
1750
1755
|
onFocus() {
|
|
1751
1756
|
this._createTooltip();
|
|
1752
1757
|
}
|
|
1753
1758
|
onBlur() {
|
|
1754
|
-
|
|
1755
|
-
(_a = this.componentIns) === null || _a === void 0 ? void 0 : _a.hide();
|
|
1759
|
+
this.hide();
|
|
1756
1760
|
}
|
|
1757
1761
|
}
|
|
1758
1762
|
BaseTooltip.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.8", ngImport: i0, type: BaseTooltip, deps: [{ token: i1$2.Overlay }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -11024,6 +11028,12 @@ class TabHeaderComponent {
|
|
|
11024
11028
|
this._destroyed.next();
|
|
11025
11029
|
this._destroyed.complete();
|
|
11026
11030
|
}
|
|
11031
|
+
ngAfterViewInit() {
|
|
11032
|
+
// 等ngAfterContentInit的_updatePagination执行后再滚动,因为Pagination会影响布局
|
|
11033
|
+
requestAnimationFrame(() => {
|
|
11034
|
+
this._scrollToLabel(this._selectedIndex);
|
|
11035
|
+
});
|
|
11036
|
+
}
|
|
11027
11037
|
ngAfterContentChecked() {
|
|
11028
11038
|
// If the number of tab labels have changed, check if scrolling should be enabled
|
|
11029
11039
|
if (this._tabLabelCount !== this._labelWrappers.length) {
|
|
@@ -11453,19 +11463,8 @@ class TabGroupComponent {
|
|
|
11453
11463
|
}
|
|
11454
11464
|
});
|
|
11455
11465
|
if (this._selectedIndex !== indexToSelect) {
|
|
11456
|
-
|
|
11457
|
-
|
|
11458
|
-
this._changeDetectorRef.markForCheck();
|
|
11459
|
-
};
|
|
11460
|
-
if (this._selectedIndex === null) {
|
|
11461
|
-
// 第一次运行设置延迟是因为ngClass是在"初始化"后的下一个tick中才会被绑定,而布局计算依赖class,所以需要等
|
|
11462
|
-
// 等class绑定好后通过设定 _selectedIndex 触发 header 组件变更来应用关于"布局"相关的逻辑
|
|
11463
|
-
// 使用宏任务是因为 alignToElement 使用了微任务并且排在了该逻辑之后
|
|
11464
|
-
setTimeout(handle);
|
|
11465
|
-
}
|
|
11466
|
-
else {
|
|
11467
|
-
handle();
|
|
11468
|
-
}
|
|
11466
|
+
this._selectedIndex = indexToSelect;
|
|
11467
|
+
this._changeDetectorRef.markForCheck();
|
|
11469
11468
|
}
|
|
11470
11469
|
if (this._previousHeaderAddon !== this._headerAddon) {
|
|
11471
11470
|
this._previousHeaderAddon = this._headerAddon;
|