ng-zorro-antd
ng-zorro-antd copied to clipboard
NG-ZORRO V14 Upgrade Guide/ 升级指南
English Version
This guide applies to the current version ng-zorro-antd >= 14; If you encounter problems during the upgrade process, feel free to comment here. If you find any errors in this guide, please point out Or you have encountered a new problem and solved it, welcome to comment here.
Before upgrade
- Make sure
Node.js>=14.15.5or >=16.10.0. - Create a new branch, or use other methods to back up the current project.
- Delete the package-lock.json file.
1.Upgrade dependencies
- Upgrade Angular to 14.x version, ref https://update.angular.io/ .
- Run
ng update @angular/cdk, if you have used@angular/cdk.
2.Upgrade NG-ZORRO
- Run
ng update ng-zorro-antd. - If any warning messages appear in the console, follow the prompts to modify the corresponding code.
Common Problems
中文版
本指南适用于当前版本 ng-zorro-antd >= 14 ; 如果在升级过程中遇到问题,欢迎提出。提问前请阅读 如何向开源社区提问题 如果发现本指南存在遗漏/错误,请指出! 或者你遇到了新的问题并解决了,欢迎补充!
开始之前
- 首先确保你
Node.js>=14.15.5或 >=16.10.0 - 创建新的分支,或者使用其他方式备份当前项目
- 删除项目下 package-lock.json 文件
升级步骤
1. 升级相关依赖
- 前往 https://update.angular.io/ 将项目升级到 Angular 14。
- 如果你有单独使用
@angular/cdk请执行ng update @angular/cdk
2.升级 NG-ZORRO
- 运行
ng update ng-zorro-antd - 如果控制台出现警告消息请按提示修改对应代码
常见问题
样式不符
icon使用方式从i元素切换为span元素,如果切换到新的使用方式导致样式未按预期渲染,请确保 css 选择器正确书写pagination组件增加ul标签以适应语义化,确保样式中没有nz-pagination > li这样的选择器
Translation of this issue:
WIP NG-Zorro V14 Upgrade Guide/ Upgrade Guide
Todo
为什么我升级后,页面反复自动刷新,当修改文件后。强刷后又正常了。
为什么我升级后,页面反复自动刷新,当修改文件后。强刷后又正常了。
有复现吗?
为什么我升级后,页面反复自动刷新,当修改文件后。强刷后又正常了。
有复现吗?
没有,空了我再试试
./projects/mgr/src/styles.less - Error: Module build failed (from ./node_modules/less-loader/dist/cjs.js):
// @import './variable.less'; @import './@{root-entry-name}.less'; ^ Variable @root-entry-name is undefined Error in ./code/front/node_modules/ng-zorro-antd/style/themes/index.less (line 7, column 8)