fantasy-ngzorro 2.1.63 → 2.1.64

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/README.md CHANGED
@@ -42,6 +42,7 @@
42
42
  | — | 2026-9-22 | `hd-tip` 支持右侧展开/收起(`showCollapse` / `[(expanded)]`),暴露 `expand` / `collapse` / `toggle` 供父组件控制其它区块 |
43
43
  | — | 2026-9-22 | `hd-form-lines` 勾选提示改为 `tableTotal` 插槽(同 hd-table),组件内不再默认渲染已选中块 |
44
44
  | — | 2026-9-22 | `hd-table` / `hd-detail-form` 字段值后支持编辑笔图标(`editable` + `edit` 回调,图标对齐 Figma) |
45
+ | — | 2026-9-24 | `hd-detail-lines` / `hd-detail-lines-page`:自动或仅传 `scroll.x` 时补 `scroll.y`,修复窄屏下无法纵向滚动 |
45
46
  | — | 2026-9-22 | `hd-table` 支持 `pagination` / `frontPagination`:全量 `content` 可「不分页展示」或「前端切片分页」,列表默认仍为服务端分页 |
46
47
  | — | 2026-9-21 | hd-table 列 `color` 支持函数,按行给某一个字段标红 |
47
48
  | — | 2026-9-20 | hd-detail-form 附件图片:最多展示 4 张,超出末张蒙版 `+n`;弹窗预览支持左右翻页 |
@@ -709,7 +710,7 @@ formCols: HdOption[] = [
709
710
  | 参数 | 类型 | 默认值 | 说明 |
710
711
  | ---- | ---- | ------ | ---- |
711
712
  | lines | any[] | — | 明细数据 |
712
- | scroll | object | { x: '1px' } | 横向滚动 |
713
+ | scroll | object | 自动 | 不传则按列宽自动算横向滚动;有 `x` 时自动补 `y`(`calc(100vh - …)`),避免窄屏无法纵向滚动 |
713
714
  | showSearch | boolean | false | 行内搜索 |
714
715
  | searchFields | string[] | [] | 搜索字段,空则搜全部字段 |
715
716
  | hdFrontPagination | boolean | false | 前端分页 |
@@ -1559,7 +1559,16 @@
1559
1559
  * @return {?}
1560
1560
  */
1561
1561
  function () {
1562
- return this.scroll != null ? this.scroll : this.tableScroll;
1562
+ /** @type {?} */
1563
+ var base = this.scroll != null ? this.scroll : this.tableScroll;
1564
+ if (!base) {
1565
+ return null;
1566
+ }
1567
+ // 仅有 x 无 y 时补 y,避免窄屏 / 手动传 scroll.x 时无法纵向滚动
1568
+ if (base.x && !base.y) {
1569
+ return { x: base.x, y: this.getAutoScrollY() };
1570
+ }
1571
+ return base;
1563
1572
  },
1564
1573
  enumerable: true,
1565
1574
  configurable: true
@@ -1644,6 +1653,27 @@
1644
1653
  }
1645
1654
  }), delay);
1646
1655
  };
1656
+ /**
1657
+ * 开启 scroll.x 后 ant-table body 会变成 overflow:scroll 容器,
1658
+ * 若不设 scroll.y,内容再高也不会表内纵向滚动,且滚轮无法冒泡到页面。
1659
+ */
1660
+ /**
1661
+ * 开启 scroll.x 后 ant-table body 会变成 overflow:scroll 容器,
1662
+ * 若不设 scroll.y,内容再高也不会表内纵向滚动,且滚轮无法冒泡到页面。
1663
+ * @private
1664
+ * @return {?}
1665
+ */
1666
+ HdDetailLinesComponent.prototype.getAutoScrollY = /**
1667
+ * 开启 scroll.x 后 ant-table body 会变成 overflow:scroll 容器,
1668
+ * 若不设 scroll.y,内容再高也不会表内纵向滚动,且滚轮无法冒泡到页面。
1669
+ * @private
1670
+ * @return {?}
1671
+ */
1672
+ function () {
1673
+ /** @type {?} */
1674
+ var offset = this.showSearch ? 320 : 280;
1675
+ return "calc(100vh - " + offset + "px)";
1676
+ };
1647
1677
  /**
1648
1678
  * @private
1649
1679
  * @return {?}
@@ -1662,10 +1692,17 @@
1662
1692
  var nextScroll = resolveAutoTableScroll(this.nzTableComponent, hasData);
1663
1693
  /** @type {?} */
1664
1694
  var nextX = nextScroll ? nextScroll.x : null;
1665
- if (this.tableScroll && this.tableScroll.x === nextX) {
1695
+ // 有横向滚动时必须带 y,否则窄屏下无法纵向滚动
1696
+ /** @type {?} */
1697
+ var nextY = nextX ? this.getAutoScrollY() : null;
1698
+ if (this.tableScroll &&
1699
+ this.tableScroll.x === nextX &&
1700
+ this.tableScroll.y === nextY) {
1666
1701
  return;
1667
1702
  }
1668
- this.tableScroll = nextScroll;
1703
+ this.tableScroll = nextX
1704
+ ? { x: nextX, y: nextY }
1705
+ : null;
1669
1706
  this.cdr.markForCheck();
1670
1707
  };
1671
1708
  /**
@@ -2319,16 +2356,16 @@
2319
2356
  configurable: true
2320
2357
  });
2321
2358
  Object.defineProperty(HdDetailLinesPageComponent.prototype, "resolvedScroll", {
2322
- /** 虚拟滚动时保证有 scroll.y,否则 nzVirtualScroll 无效 */
2359
+ /** 虚拟滚动 / 仅有 x 时保证有 scroll.y,否则窄屏无法纵向滚动 */
2323
2360
  get: /**
2324
- * 虚拟滚动时保证有 scroll.y,否则 nzVirtualScroll 无效
2361
+ * 虚拟滚动 / 仅有 x 时保证有 scroll.y,否则窄屏无法纵向滚动
2325
2362
  * @return {?}
2326
2363
  */
2327
2364
  function () {
2328
2365
  /** @type {?} */
2329
2366
  var base = this.effectiveScroll ? __assign({}, this.effectiveScroll) : {};
2330
- if (this.useVirtualScroll && !base.y) {
2331
- base.y = "calc(100vh - 200px)";
2367
+ if ((this.useVirtualScroll || base.x) && !base.y) {
2368
+ base.y = this.getAutoScrollY();
2332
2369
  }
2333
2370
  return base;
2334
2371
  },
@@ -2546,6 +2583,25 @@
2546
2583
  }
2547
2584
  }), delay);
2548
2585
  };
2586
+ /**
2587
+ * 开启 scroll.x 后 ant-table body 会变成 overflow:scroll 容器,
2588
+ * 若不设 scroll.y,窄屏下滚轮无法纵向滚动。
2589
+ */
2590
+ /**
2591
+ * 开启 scroll.x 后 ant-table body 会变成 overflow:scroll 容器,
2592
+ * 若不设 scroll.y,窄屏下滚轮无法纵向滚动。
2593
+ * @private
2594
+ * @return {?}
2595
+ */
2596
+ HdDetailLinesPageComponent.prototype.getAutoScrollY = /**
2597
+ * 开启 scroll.x 后 ant-table body 会变成 overflow:scroll 容器,
2598
+ * 若不设 scroll.y,窄屏下滚轮无法纵向滚动。
2599
+ * @private
2600
+ * @return {?}
2601
+ */
2602
+ function () {
2603
+ return "calc(100vh - 280px)";
2604
+ };
2549
2605
  /**
2550
2606
  * @private
2551
2607
  * @return {?}
@@ -2564,18 +2620,19 @@
2564
2620
  var nextScroll = resolveAutoTableScroll(this.nzTableComponent, hasData);
2565
2621
  /** @type {?} */
2566
2622
  var nextX = nextScroll ? nextScroll.x : null;
2623
+ // 父级已指定 y(如虚拟滚动)优先保留;否则有 x 时自动补 y
2567
2624
  /** @type {?} */
2568
2625
  var currentY = this.tableScroll ? this.tableScroll.y : null;
2626
+ /** @type {?} */
2627
+ var nextY = currentY || (nextX ? this.getAutoScrollY() : null);
2569
2628
  if (this.tableScroll &&
2570
2629
  this.tableScroll.x === nextX &&
2571
- this.tableScroll.y === currentY) {
2630
+ this.tableScroll.y === nextY) {
2572
2631
  return;
2573
2632
  }
2574
- this.tableScroll = nextScroll
2575
- ? { x: nextScroll.x, y: currentY }
2576
- : currentY
2577
- ? { y: currentY }
2578
- : null;
2633
+ this.tableScroll = nextX || nextY
2634
+ ? { x: nextX, y: nextY }
2635
+ : null;
2579
2636
  this.cdr.markForCheck();
2580
2637
  };
2581
2638
  Object.defineProperty(HdDetailLinesPageComponent.prototype, "displayLines", {