@alauda/ui 6.5.9-beta → 6.5.9-beta.1
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 +4 -1
- package/esm2020/tooltip/base-tooltip.mjs +17 -9
- package/fesm2015/alauda-ui.mjs +21 -25
- package/fesm2015/alauda-ui.mjs.map +1 -1
- package/fesm2020/alauda-ui.mjs +21 -21
- package/fesm2020/alauda-ui.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2020/alauda-ui.mjs
CHANGED
|
@@ -1580,9 +1580,11 @@ class BaseTooltip {
|
|
|
1580
1580
|
this.componentIns.hide$.pipe(takeUntil(this.destroy$)).subscribe(() => {
|
|
1581
1581
|
this._disposeTooltip();
|
|
1582
1582
|
});
|
|
1583
|
-
|
|
1584
|
-
.pipe(
|
|
1585
|
-
|
|
1583
|
+
if (!this.disableAnimation) {
|
|
1584
|
+
merge(this.componentIns.beforeHide$, this.componentIns.beforeShow$.pipe(delay(0)))
|
|
1585
|
+
.pipe(takeUntil(this.destroy$))
|
|
1586
|
+
.subscribe(this._updateTransformOrigin.bind(this));
|
|
1587
|
+
}
|
|
1586
1588
|
if (this.trigger === TooltipTrigger.Hover) {
|
|
1587
1589
|
this.componentIns.hover$
|
|
1588
1590
|
.pipe(takeUntil(this.componentIns.destroy$))
|
|
@@ -1627,7 +1629,13 @@ class BaseTooltip {
|
|
|
1627
1629
|
this._createTooltip();
|
|
1628
1630
|
}
|
|
1629
1631
|
hide() {
|
|
1630
|
-
this.
|
|
1632
|
+
if (this.disableAnimation) {
|
|
1633
|
+
// 如果禁用了动画就立即销毁,而不是等动画完成事件后才销毁
|
|
1634
|
+
this._disposeTooltip();
|
|
1635
|
+
}
|
|
1636
|
+
else {
|
|
1637
|
+
this.componentIns?.hide();
|
|
1638
|
+
}
|
|
1631
1639
|
}
|
|
1632
1640
|
updatePosition() {
|
|
1633
1641
|
if (this.overlayRef) {
|
|
@@ -1699,7 +1707,7 @@ class BaseTooltip {
|
|
|
1699
1707
|
this.hostHovered = false;
|
|
1700
1708
|
await sleep(HIDDEN_DELAY);
|
|
1701
1709
|
if (!this.tooltipHovered && !this.hostHovered) {
|
|
1702
|
-
this.
|
|
1710
|
+
this.hide();
|
|
1703
1711
|
}
|
|
1704
1712
|
}
|
|
1705
1713
|
async onTooltipHovered(hovered) {
|
|
@@ -1707,7 +1715,7 @@ class BaseTooltip {
|
|
|
1707
1715
|
if (!hovered) {
|
|
1708
1716
|
await sleep(HIDDEN_DELAY);
|
|
1709
1717
|
if (!this.tooltipHovered && !this.hostHovered) {
|
|
1710
|
-
this.
|
|
1718
|
+
this.hide();
|
|
1711
1719
|
}
|
|
1712
1720
|
}
|
|
1713
1721
|
}
|
|
@@ -1718,14 +1726,14 @@ class BaseTooltip {
|
|
|
1718
1726
|
if (!this.elRef.nativeElement.contains(event.target) &&
|
|
1719
1727
|
(this.hideOnClick ||
|
|
1720
1728
|
!this.componentIns.elRef.nativeElement.contains(event.target))) {
|
|
1721
|
-
this.
|
|
1729
|
+
this.hide();
|
|
1722
1730
|
}
|
|
1723
1731
|
}
|
|
1724
1732
|
onFocus() {
|
|
1725
1733
|
this._createTooltip();
|
|
1726
1734
|
}
|
|
1727
1735
|
onBlur() {
|
|
1728
|
-
this.
|
|
1736
|
+
this.hide();
|
|
1729
1737
|
}
|
|
1730
1738
|
}
|
|
1731
1739
|
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 });
|
|
@@ -10985,6 +10993,9 @@ class TabHeaderComponent {
|
|
|
10985
10993
|
const realign = () => {
|
|
10986
10994
|
this._updatePagination();
|
|
10987
10995
|
this._alignActiveIndicatorToSelectedTab();
|
|
10996
|
+
requestAnimationFrame(() => {
|
|
10997
|
+
this._scrollToLabel(this._selectedIndex);
|
|
10998
|
+
});
|
|
10988
10999
|
};
|
|
10989
11000
|
this._keyManager = new FocusKeyManager(this._labelWrappers)
|
|
10990
11001
|
.withHorizontalOrientation('ltr')
|
|
@@ -11375,19 +11386,8 @@ class TabGroupComponent {
|
|
|
11375
11386
|
}
|
|
11376
11387
|
});
|
|
11377
11388
|
if (this._selectedIndex !== indexToSelect) {
|
|
11378
|
-
|
|
11379
|
-
|
|
11380
|
-
this._changeDetectorRef.markForCheck();
|
|
11381
|
-
};
|
|
11382
|
-
if (this._selectedIndex === null) {
|
|
11383
|
-
// 第一次运行设置延迟是因为ngClass是在"初始化"后的下一个tick中才会被绑定,而布局计算依赖class,所以需要等
|
|
11384
|
-
// 等class绑定好后通过设定 _selectedIndex 触发 header 组件变更来应用关于"布局"相关的逻辑
|
|
11385
|
-
// 使用宏任务是因为 alignToElement 使用了微任务并且排在了该逻辑之后
|
|
11386
|
-
setTimeout(handle);
|
|
11387
|
-
}
|
|
11388
|
-
else {
|
|
11389
|
-
handle();
|
|
11390
|
-
}
|
|
11389
|
+
this._selectedIndex = indexToSelect;
|
|
11390
|
+
this._changeDetectorRef.markForCheck();
|
|
11391
11391
|
}
|
|
11392
11392
|
if (this._previousHeaderAddon !== this._headerAddon) {
|
|
11393
11393
|
this._previousHeaderAddon = this._headerAddon;
|