fantasy-ngzorro 2.2.35 → 2.2.36
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/fantasy-ngzorro.umd.js +34 -8
- package/bundles/fantasy-ngzorro.umd.js.map +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js +1 -1
- package/bundles/fantasy-ngzorro.umd.min.js.map +1 -1
- package/esm2015/hd-table/hd-table.component.js +37 -11
- package/esm5/hd-table/hd-table.component.js +36 -10
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +35 -9
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +34 -8
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/package.json +2 -2
package/fesm5/fantasy-ngzorro.js
CHANGED
|
@@ -11568,12 +11568,19 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
11568
11568
|
return;
|
|
11569
11569
|
}
|
|
11570
11570
|
/** @type {?} */
|
|
11571
|
+
var prevHasX = !!(this.scroll && this.scroll.x);
|
|
11572
|
+
/** @type {?} */
|
|
11571
11573
|
var prevHasY = !!(this.scroll && this.scroll.y);
|
|
11572
11574
|
this.dealScroll();
|
|
11573
11575
|
/** @type {?} */
|
|
11576
|
+
var nextHasX = !!(this.scroll && this.scroll.x);
|
|
11577
|
+
/** @type {?} */
|
|
11574
11578
|
var nextHasY = !!(this.scroll && this.scroll.y);
|
|
11575
|
-
// 运行中 y
|
|
11576
|
-
|
|
11579
|
+
// 运行中 x/y 从有变无/从无变有时,也必须重建:
|
|
11580
|
+
// - y:ng-zorro 只在 AfterViewInit 绑一次 header/body 同步
|
|
11581
|
+
// - x:空表 scroll.x=null(table-layout:auto)→ 有数据后设 scroll.x(fixed),
|
|
11582
|
+
// 不重建时勾选列仍按 auto 均摊撑开(收款编辑等异步灌数页)
|
|
11583
|
+
if (prevHasY !== nextHasY || prevHasX !== nextHasX) {
|
|
11577
11584
|
this.showTable = false;
|
|
11578
11585
|
this.cdr.markForCheck();
|
|
11579
11586
|
setTimeout((/**
|
|
@@ -11586,6 +11593,8 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
11586
11593
|
* @return {?}
|
|
11587
11594
|
*/
|
|
11588
11595
|
function () {
|
|
11596
|
+
_this.dealScroll();
|
|
11597
|
+
_this.cdr.markForCheck();
|
|
11589
11598
|
_this.afterTableRender(useVirtual);
|
|
11590
11599
|
}));
|
|
11591
11600
|
}));
|
|
@@ -12510,6 +12519,14 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12510
12519
|
var viewportCompare = this.nzTableComponent
|
|
12511
12520
|
? getTableScrollXViewportWidth(this.nzTableComponent)
|
|
12512
12521
|
: 0;
|
|
12522
|
+
// 表体尚未量到宽时(异步灌数 / spin / 刚 remount),用宿主宽兜底
|
|
12523
|
+
if (viewportCompare <= 0 && this.hostEl && this.hostEl.nativeElement) {
|
|
12524
|
+
/** @type {?} */
|
|
12525
|
+
var hostW = ((/** @type {?} */ (this.hostEl.nativeElement))).offsetWidth;
|
|
12526
|
+
if (hostW > 0) {
|
|
12527
|
+
viewportCompare = hostW;
|
|
12528
|
+
}
|
|
12529
|
+
}
|
|
12513
12530
|
if (viewportCompare > 0) {
|
|
12514
12531
|
if (declaredColWidth > viewportCompare + 1) {
|
|
12515
12532
|
return {
|
|
@@ -12534,10 +12551,10 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12534
12551
|
isFluid: true,
|
|
12535
12552
|
};
|
|
12536
12553
|
}
|
|
12537
|
-
|
|
12538
|
-
|
|
12554
|
+
// 视口仍测不到:至少用声明宽设 scroll.x,强制 fixed 布局锁勾选列,
|
|
12555
|
+
// 避免落回 table-layout:auto 被均摊撑开;后续 sync/remount 再转 fluid。
|
|
12539
12556
|
return {
|
|
12540
|
-
scrollX:
|
|
12557
|
+
scrollX: Math.ceil(declaredColWidth) + "px",
|
|
12541
12558
|
fluidExtra: 0,
|
|
12542
12559
|
displayTotal: declaredColWidth,
|
|
12543
12560
|
isFluid: false,
|
|
@@ -12570,16 +12587,20 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12570
12587
|
* @return {?}
|
|
12571
12588
|
*/
|
|
12572
12589
|
function (item) {
|
|
12573
|
-
if (item && item.isShow) {
|
|
12590
|
+
if (item && item.isShow !== false) {
|
|
12574
12591
|
declared += item.width > 0 ? item.width : ColWidth.fixColWidth;
|
|
12575
12592
|
}
|
|
12576
12593
|
}));
|
|
12577
12594
|
}
|
|
12578
12595
|
/** @type {?} */
|
|
12596
|
+
var prevHasX = !!(this.scroll && this.scroll.x);
|
|
12597
|
+
/** @type {?} */
|
|
12579
12598
|
var layout = this.resolveHorizontalLayout(declared);
|
|
12580
12599
|
/** @type {?} */
|
|
12581
12600
|
var currentY = this.scroll ? this.scroll.y : null;
|
|
12582
12601
|
/** @type {?} */
|
|
12602
|
+
var nextHasX = !!layout.scrollX;
|
|
12603
|
+
/** @type {?} */
|
|
12583
12604
|
var sameX = this.scroll && this.scroll.x === layout.scrollX;
|
|
12584
12605
|
/** @type {?} */
|
|
12585
12606
|
var sameExtra = this.fluidExtraWidth === layout.fluidExtra;
|
|
@@ -12602,6 +12623,11 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12602
12623
|
this.tableColWidthTotal = layout.displayTotal;
|
|
12603
12624
|
this.scroll = { x: layout.scrollX, y: currentY };
|
|
12604
12625
|
this.cdr.markForCheck();
|
|
12626
|
+
// sync 阶段若补上了 scroll.x,需重建才能切到 fixed 布局
|
|
12627
|
+
if (prevHasX !== nextHasX) {
|
|
12628
|
+
this.applyTableScrollMode(true);
|
|
12629
|
+
return;
|
|
12630
|
+
}
|
|
12605
12631
|
setTimeout((/**
|
|
12606
12632
|
* @return {?}
|
|
12607
12633
|
*/
|
|
@@ -12932,7 +12958,7 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12932
12958
|
if (!item.width) {
|
|
12933
12959
|
item.width = ColWidth.fixColWidth;
|
|
12934
12960
|
}
|
|
12935
|
-
if (item.isShow) {
|
|
12961
|
+
if (item.isShow !== false) {
|
|
12936
12962
|
item.fixedWidth = colWidth;
|
|
12937
12963
|
colWidth += item.width;
|
|
12938
12964
|
}
|
|
@@ -12943,7 +12969,7 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12943
12969
|
for (var i = this.tableCols.length - 1; i >= 0; i--) {
|
|
12944
12970
|
/** @type {?} */
|
|
12945
12971
|
var item = this.tableCols[i];
|
|
12946
|
-
if (
|
|
12972
|
+
if (item.isShow === false) {
|
|
12947
12973
|
continue;
|
|
12948
12974
|
}
|
|
12949
12975
|
if (item.fixed === "right") {
|