fantasy-ngzorro 2.2.34 → 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 +39 -12
- 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 +42 -15
- package/esm5/hd-table/hd-table.component.js +41 -14
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +40 -13
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +39 -12
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/package.json +2 -2
package/fesm5/fantasy-ngzorro.js
CHANGED
|
@@ -11057,10 +11057,11 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
11057
11057
|
changes["tableData"]["currentValue"]["pageNumber"] !==
|
|
11058
11058
|
changes["tableData"]["previousValue"]["pageNumber"]) {
|
|
11059
11059
|
this.pendingResetScrollTop = true;
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11060
|
+
// pageSize/pageNumber 变化也要重算 scroll / fluid。
|
|
11061
|
+
// 业务常把 Page.pageSize 写成 content.length(如收款编辑 toPage),
|
|
11062
|
+
// virtualScroll=false 时若这里跳过,空表初始化后的 fluid 不会补上,勾选列被撑开。
|
|
11063
|
+
// applyTableScrollMode(false) 在模式未变时只 dealScroll,不会强制重建清排序态。
|
|
11064
|
+
this.applyTableScrollMode(false);
|
|
11064
11065
|
// 翻页/改 pageSize:主动多次复位,覆盖 CDK 异步渲染时序
|
|
11065
11066
|
this.scheduleResetTableBodyScrollTop();
|
|
11066
11067
|
return;
|
|
@@ -11567,12 +11568,19 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
11567
11568
|
return;
|
|
11568
11569
|
}
|
|
11569
11570
|
/** @type {?} */
|
|
11571
|
+
var prevHasX = !!(this.scroll && this.scroll.x);
|
|
11572
|
+
/** @type {?} */
|
|
11570
11573
|
var prevHasY = !!(this.scroll && this.scroll.y);
|
|
11571
11574
|
this.dealScroll();
|
|
11572
11575
|
/** @type {?} */
|
|
11576
|
+
var nextHasX = !!(this.scroll && this.scroll.x);
|
|
11577
|
+
/** @type {?} */
|
|
11573
11578
|
var nextHasY = !!(this.scroll && this.scroll.y);
|
|
11574
|
-
// 运行中 y
|
|
11575
|
-
|
|
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) {
|
|
11576
11584
|
this.showTable = false;
|
|
11577
11585
|
this.cdr.markForCheck();
|
|
11578
11586
|
setTimeout((/**
|
|
@@ -11585,6 +11593,8 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
11585
11593
|
* @return {?}
|
|
11586
11594
|
*/
|
|
11587
11595
|
function () {
|
|
11596
|
+
_this.dealScroll();
|
|
11597
|
+
_this.cdr.markForCheck();
|
|
11588
11598
|
_this.afterTableRender(useVirtual);
|
|
11589
11599
|
}));
|
|
11590
11600
|
}));
|
|
@@ -12509,6 +12519,14 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12509
12519
|
var viewportCompare = this.nzTableComponent
|
|
12510
12520
|
? getTableScrollXViewportWidth(this.nzTableComponent)
|
|
12511
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
|
+
}
|
|
12512
12530
|
if (viewportCompare > 0) {
|
|
12513
12531
|
if (declaredColWidth > viewportCompare + 1) {
|
|
12514
12532
|
return {
|
|
@@ -12533,10 +12551,10 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12533
12551
|
isFluid: true,
|
|
12534
12552
|
};
|
|
12535
12553
|
}
|
|
12536
|
-
|
|
12537
|
-
|
|
12554
|
+
// 视口仍测不到:至少用声明宽设 scroll.x,强制 fixed 布局锁勾选列,
|
|
12555
|
+
// 避免落回 table-layout:auto 被均摊撑开;后续 sync/remount 再转 fluid。
|
|
12538
12556
|
return {
|
|
12539
|
-
scrollX:
|
|
12557
|
+
scrollX: Math.ceil(declaredColWidth) + "px",
|
|
12540
12558
|
fluidExtra: 0,
|
|
12541
12559
|
displayTotal: declaredColWidth,
|
|
12542
12560
|
isFluid: false,
|
|
@@ -12569,16 +12587,20 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12569
12587
|
* @return {?}
|
|
12570
12588
|
*/
|
|
12571
12589
|
function (item) {
|
|
12572
|
-
if (item && item.isShow) {
|
|
12590
|
+
if (item && item.isShow !== false) {
|
|
12573
12591
|
declared += item.width > 0 ? item.width : ColWidth.fixColWidth;
|
|
12574
12592
|
}
|
|
12575
12593
|
}));
|
|
12576
12594
|
}
|
|
12577
12595
|
/** @type {?} */
|
|
12596
|
+
var prevHasX = !!(this.scroll && this.scroll.x);
|
|
12597
|
+
/** @type {?} */
|
|
12578
12598
|
var layout = this.resolveHorizontalLayout(declared);
|
|
12579
12599
|
/** @type {?} */
|
|
12580
12600
|
var currentY = this.scroll ? this.scroll.y : null;
|
|
12581
12601
|
/** @type {?} */
|
|
12602
|
+
var nextHasX = !!layout.scrollX;
|
|
12603
|
+
/** @type {?} */
|
|
12582
12604
|
var sameX = this.scroll && this.scroll.x === layout.scrollX;
|
|
12583
12605
|
/** @type {?} */
|
|
12584
12606
|
var sameExtra = this.fluidExtraWidth === layout.fluidExtra;
|
|
@@ -12601,6 +12623,11 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12601
12623
|
this.tableColWidthTotal = layout.displayTotal;
|
|
12602
12624
|
this.scroll = { x: layout.scrollX, y: currentY };
|
|
12603
12625
|
this.cdr.markForCheck();
|
|
12626
|
+
// sync 阶段若补上了 scroll.x,需重建才能切到 fixed 布局
|
|
12627
|
+
if (prevHasX !== nextHasX) {
|
|
12628
|
+
this.applyTableScrollMode(true);
|
|
12629
|
+
return;
|
|
12630
|
+
}
|
|
12604
12631
|
setTimeout((/**
|
|
12605
12632
|
* @return {?}
|
|
12606
12633
|
*/
|
|
@@ -12931,7 +12958,7 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12931
12958
|
if (!item.width) {
|
|
12932
12959
|
item.width = ColWidth.fixColWidth;
|
|
12933
12960
|
}
|
|
12934
|
-
if (item.isShow) {
|
|
12961
|
+
if (item.isShow !== false) {
|
|
12935
12962
|
item.fixedWidth = colWidth;
|
|
12936
12963
|
colWidth += item.width;
|
|
12937
12964
|
}
|
|
@@ -12942,7 +12969,7 @@ var HdTableComponent = /** @class */ (function () {
|
|
|
12942
12969
|
for (var i = this.tableCols.length - 1; i >= 0; i--) {
|
|
12943
12970
|
/** @type {?} */
|
|
12944
12971
|
var item = this.tableCols[i];
|
|
12945
|
-
if (
|
|
12972
|
+
if (item.isShow === false) {
|
|
12946
12973
|
continue;
|
|
12947
12974
|
}
|
|
12948
12975
|
if (item.fixed === "right") {
|