fantasy-ngzorro 2.1.37 → 2.1.38
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 +45 -10
- 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 +30 -10
- package/esm5/hd-table/hd-table.component.js +46 -11
- package/fantasy-ngzorro.metadata.json +1 -1
- package/fesm2015/fantasy-ngzorro.js +29 -9
- package/fesm2015/fantasy-ngzorro.js.map +1 -1
- package/fesm5/fantasy-ngzorro.js +45 -10
- package/fesm5/fantasy-ngzorro.js.map +1 -1
- package/hd-table/hd-table.component.d.ts +7 -0
- package/package.json +1 -1
|
@@ -7819,16 +7819,32 @@
|
|
|
7819
7819
|
enumerable: true,
|
|
7820
7820
|
configurable: true
|
|
7821
7821
|
});
|
|
7822
|
-
|
|
7823
|
-
|
|
7822
|
+
/**
|
|
7823
|
+
* 纵向可用高度扣减:按钮区/合计/分页等固定占位。
|
|
7824
|
+
* 必须与 dealScroll / presetScrollBeforeRemount 使用同一套,否则会误判「能放下」而不设 scroll.y。
|
|
7825
|
+
*/
|
|
7826
|
+
/**
|
|
7827
|
+
* 纵向可用高度扣减:按钮区/合计/分页等固定占位。
|
|
7828
|
+
* 必须与 dealScroll / presetScrollBeforeRemount 使用同一套,否则会误判「能放下」而不设 scroll.y。
|
|
7829
|
+
* @private
|
|
7830
|
+
* @return {?}
|
|
7831
|
+
*/
|
|
7832
|
+
HdTableComponent.prototype.getScrollYMaxOffset = /**
|
|
7833
|
+
* 纵向可用高度扣减:按钮区/合计/分页等固定占位。
|
|
7834
|
+
* 必须与 dealScroll / presetScrollBeforeRemount 使用同一套,否则会误判「能放下」而不设 scroll.y。
|
|
7835
|
+
* @private
|
|
7836
|
+
* @return {?}
|
|
7837
|
+
*/
|
|
7838
|
+
function () {
|
|
7839
|
+
return (this.tableTotal ? 180 : 140) + 216;
|
|
7840
|
+
};
|
|
7841
|
+
Object.defineProperty(HdTableComponent.prototype, "needsVerticalScroll", {
|
|
7842
|
+
/** 当前页内容高度是否超出视口(需要表内纵向滚动) */
|
|
7824
7843
|
get: /**
|
|
7825
|
-
*
|
|
7844
|
+
* 当前页内容高度是否超出视口(需要表内纵向滚动)
|
|
7826
7845
|
* @return {?}
|
|
7827
7846
|
*/
|
|
7828
7847
|
function () {
|
|
7829
|
-
if (!this.virtualScroll) {
|
|
7830
|
-
return false;
|
|
7831
|
-
}
|
|
7832
7848
|
/** @type {?} */
|
|
7833
7849
|
var rowCount = this.tableData && this.tableData.content
|
|
7834
7850
|
? this.tableData.content.length
|
|
@@ -7837,7 +7853,7 @@
|
|
|
7837
7853
|
return false;
|
|
7838
7854
|
}
|
|
7839
7855
|
/** @type {?} */
|
|
7840
|
-
var maxOffset = this.
|
|
7856
|
+
var maxOffset = this.getScrollYMaxOffset();
|
|
7841
7857
|
/** @type {?} */
|
|
7842
7858
|
var estimatedHeight = rowCount * this.effectiveVirtualItemSize;
|
|
7843
7859
|
if (typeof window !== "undefined") {
|
|
@@ -7848,6 +7864,21 @@
|
|
|
7848
7864
|
enumerable: true,
|
|
7849
7865
|
configurable: true
|
|
7850
7866
|
});
|
|
7867
|
+
Object.defineProperty(HdTableComponent.prototype, "useVirtualScroll", {
|
|
7868
|
+
/** 当前页数据能完整展示时不启用虚拟滚动,避免少量数据也出现滚动条 */
|
|
7869
|
+
get: /**
|
|
7870
|
+
* 当前页数据能完整展示时不启用虚拟滚动,避免少量数据也出现滚动条
|
|
7871
|
+
* @return {?}
|
|
7872
|
+
*/
|
|
7873
|
+
function () {
|
|
7874
|
+
if (!this.virtualScroll) {
|
|
7875
|
+
return false;
|
|
7876
|
+
}
|
|
7877
|
+
return this.needsVerticalScroll;
|
|
7878
|
+
},
|
|
7879
|
+
enumerable: true,
|
|
7880
|
+
configurable: true
|
|
7881
|
+
});
|
|
7851
7882
|
/**
|
|
7852
7883
|
* @param {?} col
|
|
7853
7884
|
* @return {?}
|
|
@@ -8027,7 +8058,7 @@
|
|
|
8027
8058
|
*/
|
|
8028
8059
|
function (useVirtual) {
|
|
8029
8060
|
/** @type {?} */
|
|
8030
|
-
var maxOffset =
|
|
8061
|
+
var maxOffset = this.getScrollYMaxOffset();
|
|
8031
8062
|
/** @type {?} */
|
|
8032
8063
|
var x = this.scroll ? this.scroll.x : null;
|
|
8033
8064
|
if (this.virtualScroll && !useVirtual) {
|
|
@@ -8057,6 +8088,11 @@
|
|
|
8057
8088
|
}
|
|
8058
8089
|
if (this.virtualScroll) {
|
|
8059
8090
|
this.measureVirtualItemSize(true);
|
|
8091
|
+
// 实测行高后可能从「能放下」变为「超出」,需切换滚动模式
|
|
8092
|
+
if (this.useVirtualScroll) {
|
|
8093
|
+
this.applyTableScrollMode(false);
|
|
8094
|
+
return;
|
|
8095
|
+
}
|
|
8060
8096
|
}
|
|
8061
8097
|
setTimeout((/**
|
|
8062
8098
|
* @return {?}
|
|
@@ -8853,8 +8889,7 @@
|
|
|
8853
8889
|
}
|
|
8854
8890
|
this.tableColWidthTotal = colWidth;
|
|
8855
8891
|
/** @type {?} */
|
|
8856
|
-
var maxOffset = this.
|
|
8857
|
-
maxOffset += 216;
|
|
8892
|
+
var maxOffset = this.getScrollYMaxOffset();
|
|
8858
8893
|
/** @type {?} */
|
|
8859
8894
|
var useVirtual = this.useVirtualScroll;
|
|
8860
8895
|
/** @type {?} */
|