本篇內容爲指導從 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
轉載請註明原文連接和做者名稱