本篇内容为指导从 yoyo-ng-module 1.x
升级到 yoyo-ng-module 2.x
html
52ABP前端框架采用的是 基于NG-Zorro构建的脚手架 NG-Alian,将其修改并整合到前端模块yoyo-ng-module
中前端
最初支持版本: Angular6 + NG-Zorro(低于1.8)版本 + NG-Alian 1.x
git
近期因为NG-Zorro 1.8 版本的升级对原有图标的升级是破坏式的,而且NG-Alian也发布了2.0正式版,因而乎近几日也对yoyo-ng-module
进行了升级,发布了2.0.1。github
升级部分:npm
新版本能够经过 官网 或者 github 直接下载。json
升级教程正式开始bash
如下命令看我的喜爱使用前端框架
npm命令 : npm install ng-zorro-antd@1.8.0
yarn命令: yarn add ng-zorro-antd@1.8.0
复制代码
npm命令 : npm install yoyo-ng-module@2.0.1
yarn命令: yarn add yoyo-ng-module@2.0.1
复制代码
ng g ng-zorro-antd:fix-icon
复制代码
从 官网 或者 github 下载 4.0.0 的代码,将这里面的部份内容替换到原有项目中antd
注意 : 替换文件时请确认是否有自定义功能已添加,替换前请注意备份app
替换 文件
src/account/account.module.ts替换 文件
src/account/login/login.component.html替换 文件
src/account/login/login.component.less替换 文件
src/account/register/register.component.html替换 文件
src/account/tenant/tenant-change-modal.component.html替换 文件
src/account/tenant-register/tenant-register.component.html替换 文件
src/app/app.component.html替换 文件
src/app/app.component.ts参照修改 文件
src/app/AppMenus.ts替换 文件
src/app/home/home.component.html替换 文件夹(目录)
src/app/layout替换 文件
src/styles.less替换 文件
src/styles/index.less替换 文件
src/styles/theme.less新增 文件
src/styles/theme-variable.less新增 文件
src/style-icons-auto.ts新增 文件
src/style-icons.ts替换 文件
src/shared/shared.module.ts替换 文件
src/assets/appconfig.dev.json替换 文件
src/shared/appconfig.prod.json替换 文件
src/root.module.ts替换 文件
src/root.component.ts替换 文件
src/yoyo.module.ts替换 文件
src/AppPreBootstrap.ts以上步骤执行完成以后便可成功升级到ng-zorro1.8.x + ng-alian 2.0
若有疑问或发生问题请加入qq群:633751348
转载请注明原文连接和做者名称