Download Latest Version 20.1.3 source code.tar.gz (4.3 MB)
Email in envelope

Get an email when there's a new version of NG-ZORRO

Home / 20.0.0
Name Modified Size InfoDownloads / Week
Parent folder
20.0.0 source code.tar.gz 2025-07-01 4.3 MB
20.0.0 source code.zip 2025-07-01 5.8 MB
README.md 2025-07-01 16.7 kB
Totals: 3 Items   10.2 MB 0

20.0.0

2025-07-01

Features

  • cascader,date-picker,input-number,input,select,time-picker,tree-select: support nzVariant (#9131) (b342bb4)
  • popover: add nzPopoverTitleContext and nzPopoverContentContext (#9126) (df3ead9)
  • select: add nzOnClear callback (#9188) (e047ac2)
  • avatar: add loading and fetchpriority attributes (#7347) (ff8419f)
  • popconfirm: add nzOkButtonProps and nzCancelButtonProps (#9245) (22e2a9f)
  • tree-select: render title of selected node in innerHTML (#9259) (8066f7b)

Bug Fixes

  • flex: fix NzAlign type (#9151) (b271c19)
  • segmented: accepts disabled state from ng control (#9166) (134cd59)
  • space: border radius compact mode one item (#9165) (d2f4541)
  • tabs: prevent incorrect scroll offset on tab focus (#9186) (4f658e0)
  • schematics: ng add failed when call twice (#9171) (d0a9748)
  • water-mark: make server-side compatible (#9250) (a70a682)
  • icon: debounce icon rendering on animation frame (#8579) (c0709d1)

Code Refactoring

  • core: cleanup animation frame polyfill (#9243) (272237a)
  • migrate to inject pattern

⚠ BREAKING CHANGES

  • core: refactoring in ng-zorro-antd/core/polyfill:
  • rename cancelRequestAnimationFrame to cancelAnimationFrame
  • rename reqAnimFrame to requestAnimationFrame
  • tabs: rename NzTabsetComponent to NzTabsComponent, nz-tabset selector to nz-tabs, the original component and selector are marked as deprecated
  • table: no longer compatible with material components
  • popconfirm: nzOkDisabled and nzOkDanger are marked as deprecated, use nzOkButtonProps and nzCancelButtonProps instead

Remove the following APIs which were marked as deprecated in the previous version:

Module API
ng-zorro-antd/button NzButtonGroupComponent
ng-zorro-antd/core/form NzFormPatchModule
ng-zorro-antd/core/highlight NzHighlightModule
ng-zorro-antd/checkbox NzCheckBoxOptionInterface
ng-zorro-antd/input NzInputGroupComponent#nzCompact
ng-zorro-antd/message NzMessageModule
ng-zorro-antd/notification NzNotificationModule
NzNotificationServiceModule

The exportAs of components are updated to follow camelCase and start with nz, exportAs of internal components are removed. Changes can be seen as follow:

Component Original Current
calendar-footer calendarFooter -
date-helper dateHelper -
date-range-popup dateRangePopup -
date-table dateTable -
decade-helper decadeHelper -
decade-table decadeTable -
month-helper monthHelper -
month-table monthTable -
quarter-helper quarterHelper -
quarter-table quarterTable -
year-helper yearHelper -
year-table yearTable -
inner-popup innerPopup -
nz-color-block NzColorBlock nzColorBlock
nz-color-format NzColorFormat nzColorFormat
nz-color-picker NzColorPicker nzColorPicker
nz-model-close NzModalCloseBuiltin nzModalCloseBuiltin
nz-model-footer NzModalFooterBuiltin nzModalFooterBuiltin
nz-model-title NzModalTitleBuiltin nzModalTitleBuiltin
nz-tree-drop-indicator NzTreeDropIndicator nzTreeDropIndicator
nz-water-mark NzWaterMark nzWaterMark
nz-tabs nzTabset nzTabs

Deprecations

The following APIs are marked as deprecated in v20 and will be removed in the next major version. Please refer to related documentation for better alternatives.

Module API
ng-zorro-antd/autocomplete NZ_AUTOCOMPLETE_VALUE_ACCESSOR
getNzAutocompleteMissingPanelError
ng-zorro-antd/button NzButtonGroupComponent
ng-zorro-antd/core/form NzFormPatchModule
ng-zorro-antd/checkbox NzCheckBoxOptionInterface
ng-zorro-antd/input NzInputGroupComponent#nzCompact
ng-zorro-antd/mention NZ_MENTION_TRIGGER_ACCESSOR
ng-zorro-antd/message NzMessageModule
ng-zorro-antd/notification NzNotificationModule
NzNotificationServiceModule
ng-zorro-antd/tabs NzTabsetComponent

20.0.0

2025-07-01

Features

  • cascader,date-picker,input-number,input,select,time-picker,tree-select: 新增 nzVariant 属性设置变体 (#9131) (b342bb4)
  • popover: 新增 nzPopoverTitleContextnzPopoverContentContext 属性 (#9126) (df3ead9)
  • select: 新增 nzOnClear 事件回调 (#9188) (e047ac2)
  • avatar: 支持设置原生 <img>loadingfetchpriority 属性 (#7347) (ff8419f)
  • popconfirm: 新增 nzOkButtonPropsnzCancelButtonProps (#9245) (22e2a9f)
  • tree-select: 支持以 innerHTML 渲染已选项的 title (#9259) (8066f7b)

Bug Fixes

  • flex: 修复 NzAlign 类型 (#9151) (b271c19)
  • segmented: 接受 ng control 的禁用状态 (#9166) (134cd59)
  • space: 紧凑模式下只有一个子元素时的 border-radius 不正确 (#9165) (d2f4541)
  • tabs: 修复 tab focus 时不正确的滚动行为 (#9186) (4f658e0)
  • schematics: 修复重复执行 ng add 时的问题 (#9171) (d0a9748)
  • water-mark: 修复 ssr 模式的兼容问题 (#9250) (a70a682)
  • icon: 在 animation frame 上增加渲染防抖 (#8579) (c0709d1)

Code Refactoring

  • core: 移除对 animation frame 的 polyfill (#9243) (272237a)
  • 从基于 constructor 的依赖注入模式迁移到 inject

⚠ BREAKING CHANGES

  • core: 移除对 animation frame 的 polyfill
  • 重命名 cancelRequestAnimationFramecancelAnimationFrame
  • 重命名 reqAnimFramerequestAnimationFrame
  • tabs: 废弃 NzTabsetComponent 并重命名为 NzTabsComponent,废弃 nz-tabset 选择器并重命名为 nz-tabs
  • table: 移除对 material 组件的兼容
  • popconfirm: 废弃 nzOkDisablednzOkDanger,请使用 nzOkButtonProps 代替

移除以下在过去的版本中标记为废弃的 API:

Module API
ng-zorro-antd/button NzButtonGroupComponent
ng-zorro-antd/core/form NzFormPatchModule
ng-zorro-antd/checkbox NzCheckBoxOptionInterface
ng-zorro-antd/input NzInputGroupComponent#nzCompact
ng-zorro-antd/message NzMessageModule
ng-zorro-antd/notification NzNotificationModule
NzNotificationServiceModule

组件的 exportAs 属性命名统一采用小驼峰 camelCase 且以 nz 开头,并移除一些内部组件的 exportAs 属性。变化如下:

Component Original Current
calendar-footer calendarFooter -
date-helper dateHelper -
date-range-popup dateRangePopup -
date-table dateTable -
decade-helper decadeHelper -
decade-table decadeTable -
month-helper monthHelper -
month-table monthTable -
quarter-helper quarterHelper -
quarter-table quarterTable -
year-helper yearHelper -
year-table yearTable -
inner-popup innerPopup -
nz-color-block NzColorBlock nzColorBlock
nz-color-format NzColorFormat nzColorFormat
nz-color-picker NzColorPicker nzColorPicker
nz-model-close NzModalCloseBuiltin nzModalCloseBuiltin
nz-model-footer NzModalFooterBuiltin nzModalFooterBuiltin
nz-model-title NzModalTitleBuiltin nzModalTitleBuiltin
nz-tree-drop-indicator NzTreeDropIndicator nzTreeDropIndicator
nz-water-mark NzWaterMark nzWaterMark
nz-tabs nzTabset nzTabs

Deprecations

在 v20 中,以下 API 被标记为 deprecated,并将在下一个主要版本中移除。 请参考相关文档以获取更好的替代方案。

Module API
ng-zorro-antd/autocomplete NZ_AUTOCOMPLETE_VALUE_ACCESSOR
getNzAutocompleteMissingPanelError
ng-zorro-antd/button NzButtonGroupComponent
ng-zorro-antd/core/highlight NzHighlightModule
ng-zorro-antd/core/form NzFormPatchModule
ng-zorro-antd/checkbox NzCheckBoxOptionInterface
ng-zorro-antd/input NzInputGroupComponent#nzCompact
ng-zorro-antd/mention NZ_MENTION_TRIGGER_ACCESSOR
ng-zorro-antd/message NzMessageModule
ng-zorro-antd/notification NzNotificationModule
NzNotificationServiceModule
ng-zorro-antd/tabs NzTabsetComponent
Source: README.md, updated 2025-07-01