Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NG-ZORRO 9.0 #5024

Closed
hsuanxyz opened this issue Apr 14, 2020 · 0 comments
Closed

NG-ZORRO 9.0 #5024

hsuanxyz opened this issue Apr 14, 2020 · 0 comments

Comments

@hsuanxyz
Copy link
Member

hsuanxyz commented Apr 14, 2020

中文 [点击展开]

Highlights

支持 Angular Ivy

我们已经将 @angular/*@angular/cdk 版本升级到 v9,现在你可以使用 Ivy 渲染引擎运行你的项目,并且开启 strictTemplates 选项使用更严格的的模版类型检查。

获取更多帮助请前往 Angular IvyTemplate type 查看。

Ant Design 4 设计规范

我们已经同步了 Ant Design 4 设计规范,并且添加了暗黑(Dark)和紧凑(Compact) 主题支持。

date-fns 2.0

我们已经将日期处理程序 date-fns 升级到了 2.0,修复了很多遗留问题并支持按用户提供的格式解析日期字符串的功能。

你可以前往 v2 Upgrade Guide 查看升级指南。

同时提供了暂时性的兼容方案,你可以在根模块中按如下代码设置以打开兼容模式(不建议):

providers: [
  { provide: NZ_DATE_FNS_COMPATIBLE, useValue: true }
]

性能和易用性增强

  • 在之前的版本中 Table 组件已经集成了虚拟滚动,现在 Select 和 Tree 也同样支持;
  • Form 和 Table 简化了使用方式,现在可以编写更少的模版和配置;
  • 允许在子模块中添加图标,以减少首屏加载时间;
  • 现在当路由改变时弹出菜单将自动关闭,同时为 Modal 等组件添加了对应选项;

Changelog

Bug Fixes

auto-complete:

badge: 允许将 nzTitle 设置为 null (#4965) (a35fb5e), closes #4776

breadcrumb: 修复面包屑显示问题 (#4880) (2553328)

button: 修复 transition 显示问题 (9e0df2a), closes #2697

cascader: 修复无选项时的显示问题 (#4565) (9d8d7e6), closes #4562

code-editor:

date-picker:

drawer:

dropdown:

empty: 修复 Empty 在 dark 模式下的显示问题 (#4924) (bae59d7), closes #4921

grid: 修复响应式的问题 (#4906) (d6828ed)

layout:

list: 修复头像部分的兼容 API (#4952) (d8a2594), closes #4912

modal:

  • 修复在初始化为打开状态时 nzModalFooter 指令不生效的问题 (#4954) (2f400e8), closes #4948
  • 修复关闭按钮样式 (#5014) (174099e)
  • 修复 nzMaskClosable 在 confirm 模式下不工作的问题 (#4347) (475bbc4), closes #4344

mention: 修复移动端选择问题 (#4309) (1be6d51), closes #4281

menu: 修复在屏幕越界时的显示问题 (4c8032b), closes #3412 #4227 #3687

message: 修复 prod 下 message 与 notification 的问题 (#4884) (3e2f85d)

page-header: 修复 location 注入问题 (#5013) (9073fa5), closes #4945

pagination: 修复半角字符问题 (#4371) (cc3868e)

select:

slider: 修复垂直模式下拖拽句柄样式问题 (#4939) (6fba78d)

table:

timeline: 修复 reverse 下的展示问题 (#4690) (09bf8f4), closes #4509

time-picker:

transfer: 修复 nzTargetKeys 无效问题 (#4670) (31089a1), closes #4641 #4360 #4210

tooltip:

tree:

tree-select:

Features

breadcrumb: 支持独立 separator (#4713) (1f490e9)

code-editor:

collapse: 支持 nzExpandIconPosition (#4781) (760512a)

date-picker:

form:

  • 支持自动错误提示 (#4888)(0b85483), close #4523
  • 当 FormControl.status 为 INVALID 并且错误包含 {warning:true} 时,nz-form-control 显示警告状态。(#4891)(b1873da) , close #4525

grid: 支持 nzFlex 与 nzGutter 数组输入 (c4d2694)

icon: 支持在 feature module 中导入 icons (#4711) (0bcd2a9)

i18n:

input: 支持 textarea 带 clear 图标的效果 (0af9242), closes #4623

input-number:

menu:

  • 当 sider 收起时,自动触发 nzInlineCollapsed模式 (51fbf5e), closes #4680
  • 支持 nzMatchRouter 与 CanDeactivate 配合工作 (7560563), closes #4407

notification:

page-header: 增加 nzGhost 选项 (#4306) (4c78cca), closes #4303

pagination:

progress:

select: select 支持 virutal scroll 模式 (40daee9), closes #4585 #3497

skeleton: 增加 nz-skeleton-element (#4859) (8dc2ff3)

space: 添加新组件 (#4928) (df01bd1), closes #4913

table: 支持 nzQueryParams (#4970) (79ea999)

tabs: 增加了 nzCanDeactivate 钩子 (#4476) (a533980), closes #4432

tag: 增加 status colors 选项 (#4628) (aa22c0f), closes #4622 #4413

tooltip:

tree: 支持虚拟滚动 (#4979) (6803a92), closes #4426 #3808 #3436 #2680 #1771

tree-select: 支持 nzDropdownClassName 选项 (#4552) (df8c125), closes #4508

typography: 支持 nzSuffix 选项 (#4629) (ca02a07), closes #4620

Performance Improvements

checkbox: 使用 css empty selector 代替了 observeContent (#4761) (da8821a)

input: 提升 input 性能 (7af643b), closes #3950

radio: 重构了数据流 (#4770) (423a382)

BREAKING CHANGES

注意: 所有不兼容改动均在 8.x 最新版本中给出了 warning,如果你在 8.x 最新版本中修复了所有 warning,9.x 可以直接升级的,ng update 工具在 9.0 正式版会提供。

calendar:

  • <nz-calendar> nzCard 被移除了, 请使用 nzFullscreen 代替。

carousel:

  • nzVertical 被移除,请使用 'nzDotPosition' 代替。

empty:

  • NZ_DEFAULT_EMPTY_CONTENT 被移除,请使用 NzConfigService 代替。

form:

  • nz-form-extra 被移除,请使用 nz-form-control 中的 nzExtra 代替。
  • nz-form-explain 被移除,请使用 nz-form-control 中的 nzSuccessTip | nzWarningTip | nzErrorTip | nzValidatingTip 代替。

icon:

  • i[nz-icon]: twoToneColor theme spin iconfont type 输入被移除, 请使用 nzTwoToneColor nzTheme nzSpin nzIconfont nzType 代替。
  • i.anticon 被移除, 请使用 i[nz-icon] 代替。
  • NZ_ICON_DEFAULT_TWOTONE_COLOR 被移除, 请使用 NzConfigService

input-number:

  • ngModelChange 会在用户输入时立刻触发

message,notification:

  • NZ_MESSAGE_CONFIG 被移除,请使用 NzConfigService 代替。
  • NZ_NOTIFICATION_CONFIG 被移除,请使用 NzConfigService 代替。
  • config method of NzMessageService and NzNotificationService 被移除,请使用 set method of NzConfigService 代替。
  • NzMessageRef 替换 NzMessageDataFilled
  • NzNotificationRef 替换 NzNotificationDataFilled

pagination:

  • 当定制 nzItemRender 时,需要考虑 prev_5 and next_5
  • 'pre' 被修改为 'prev'

tree, tree-select:

  • 移除了 [nzDefaultExpandAll] 请使用 [nzExpandAll] 代替。
  • 移除了 [nzDefaultExpandedKeys] 请使用 [nzExpandedKeys] 代替。
  • 移除了 [nzDefaultSelectedKeys] 请使用 [nzSelectedKeys] 代替。
  • 移除了 [nzDefaultCheckedKeys] 请使用 [nzCheckedKeys] 代替。
  • 移除了 (nzOnSearchNode) 请使用 (nzSearchValueChange) 代替。

tooltip,popover,popconfirm:

  • <nz-tooltip> <nz-popover> <nz-popconfirm> 组件被移除, 请使用对应的 directives 代替。

移除 API: NgZorroAntdModule.forRoot()

Highlights

Angular Ivy Supported

We have upgraded the @angular/* and @angular/cdk versions to v9, and now you can use the Ivy rendering engine to run your project, and enable the strictTemplates option to use more strict template type checking.

More help go to Angular Ivy and Template type checking.

Ant Design 4 Spec

We have synced the Ant Design 4 design specification and support the Dark and Compact themes.

date-fns 2.0

We have updated the date handler date-fns to 2.0, fixing many issues and supported the feature to parse date strings in a user-supplied format.

You can go to the v2 Upgrade Guide to see the upgrade guide.

Also, a temporary compatibility solution is provided, you can set in the root module to enable compatibility mode by the following code (not recommended)

providers: [
  { provide: NZ_DATE_FNS_COMPATIBLE, useValue: true }
]

Enhanced Performance and Usability

  • In previous versions, the Table component has integrated virtual scrolling, also now supported for Select and Tree components.
  • Form and Table simplify usage and now allow for writing fewer templates and configurations.
  • Allow adding icons in sub-modules to reduce the first screen load time.
  • Now, the pop-up menu is automatically closed when the route is changed, and corresponding options have been added for components such as Modal.

Changelog

Bug Fixes

slider: fix handle transform in vertical mode (#4939) (6fba78d)

badge: allow nzTitle set to null (#4965) (a35fb5e), closes #4776

date-picker:

list: fix the avatar part old API (#4952) (d8a2594), closes #4912

modal:

page-header:

table:

time-picker:

tree:

empty:

grid: fix grid responsive bug (#4906) (d6828ed)

select:

auto-complete:

breadcrumb: fix breadcrumb link style (#4880) (2553328)

button: fix button animation bug caused by angular (9e0df2a), closes #2697

calendar:

  • cascader: fix not showing empty when there's no options (#4565) (9d8d7e6), closes #4562

  • code-editor:

drawer:

dropdown:

layout:

mention: unable to select on mobile device (#4309) (1be6d51), closes #4281

menu: fix menu overflow detection & replace ul with div (4c8032b), closes #3412 #4227 #3687

message,notification:

pagination: replace full-width character with half-width (#4371) (cc3868e)

timeline: fix reverse bug (#4690) (09bf8f4), closes #4509

transfer: fix transfer nzTargetKeys property (#4670) (31089a1), closes #4641 #4360 #4210

tooltip,popover,popconfirm:

tree-select:

carousel: remove vertical api (#4376) (37aa921)

icon: remove old api (#4375) (91e52ab)

Features

breadcrumb: support indenpendent separator (#4713) (1f490e9)

collapse: support nzExpandIconPosition (#4781) (760512a)
date-picker:

form:

grid: support nzFlex and nzGutter array, deprecated nzType (c4d2694)

i18n:

icon: support add icon in feat modules (#4711) (0bcd2a9)

input: support textarea with clear icon (0af9242), closes #4623

input-number:

menu:

  • auto nzInlineCollapsed when sider collapsed (51fbf5e), closes #4680
  • menu with nzMatchRouter work with CanDeactivate (7560563), closes #4407

code-editor:

notification:

page-header: add nzGhost property (#4306) (4c78cca), closes #4303

pagination:

progress:

select: refactor the select to support virutal scroll (40daee9), closes #4585 #3497

skeleton: add nz-skeleton-element (#4859) (8dc2ff3)

tabs: add nzCanDeactivate hook (#4476) (a533980), closes #4432

tag: support status colors (#4628) (aa22c0f), closes #4622 #4413

tooltip,etc:

tree-select: support nzDropdownClassName property (#4552) (df8c125), closes #4508

typography: support nzSuffix property (#4629) (ca02a07), closes #4620

space: add new component (#4928) (df01bd1), closes #4913

table: support new nzQueryParams (#4970) (79ea999)

tree: support virtual scroll (#4979) (6803a92), closes #4426 #3808 #3436 #2680 #1771

Performance Improvements

checkbox: use css empty selector instead of observeContent (#4761) (da8821a)
input: improve input-group perf (7af643b), closes #3950
radio: refactor radio group data flow (#4770) (423a382)

BREAKING CHANGES

Note: All break changes are warned in the latest version of 8.x, if you have fixed all warnings in 8.x, there will no break changes for you. Official ng update tools will be provided in version 9.0.0.

form:

  • nz-form-extra is removed. Please use nzExtra of nz-form-control instead.
  • nz-form-explain is removed. Please use nzSuccessTip | nzWarningTip | nzErrorTip | nzValidatingTip of nz-form-control instead.

input-number:

  • ngModelChange trigger at once when user typing

pagination:

  • prev_5 and next_5 is needed when use nzItemRender
  • 'pre' typo was corrected to 'prev'

tree, tree-select:

  • Removed [nzDefaultExpandAll] use [nzExpandAll] instead.
  • Removed [nzDefaultExpandedKeys] use [nzExpandedKeys] instead.
  • Removed [nzDefaultSelectedKeys] use [nzSelectedKeys] instead.
  • Removed [nzDefaultCheckedKeys] use [nzCheckedKeys] instead.
  • Removed (nzOnSearchNode) use (nzSearchValueChange) instead.
  • Removed [nzDefaultExpandedKeys] use [nzExpandedKeys] instead.

message,notification:

  • NZ_MESSAGE_CONFIG is removed. Please use NzConfigService instead.
  • NZ_NOTIFICATION_CONFIG is removed. Please use NzConfigService instead.
  • config method of NzMessageService and NzNotificationService is removed. Please use set method of NzConfigService instead.

empty:

  • NZ_DEFAULT_EMPTY_CONTENT is removed. Please use NzConfigService instead.

carousel:

  • nzVertical is removed. Please use 'nzDotPosition' instead.

icon:

  • NZ_ICON_DEFAULT_TWOTONE_COLOR is removed. Use NzConfigService instead.
  • i[nz-icon]: twoToneColor theme spin iconfont type inputs has been removed, use nzTwoToneColor nzTheme nzSpin nzIconfont nzType instead.
  • i.anticon selector has been removed, use i[nz-icon] instead.

calendar:

  • <nz-calendar> nzCard input has been removed, use nzFullscreen instead.

tooltip,popover,popconfirm:

  • <nz-tooltip> <nz-popover> <nz-popconfirm> components has been removed, use its directives instead.

Removed deprecated API NgZorroAntdModule.forRoot()

@NG-ZORRO NG-ZORRO locked as off-topic and limited conversation to collaborators Apr 14, 2020
@hsuanxyz hsuanxyz pinned this issue Apr 15, 2020
@vthinkxie vthinkxie unpinned this issue Apr 15, 2020
@vthinkxie vthinkxie pinned this issue Apr 15, 2020
@hsuanxyz hsuanxyz changed the title [Draft] NG-ZORRO 9.0 NG-ZORRO 9.0 Apr 15, 2020
@vthinkxie vthinkxie unpinned this issue Apr 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants