天天看点

SAP Spartacus SplitViewComponent Migration 的一个具体例子

参考 Pull Request: https://github.com/SAP/spartacus/pull/9946/files

  1. 首先在 docs/migration/3.0_md 里添加文字描述:
    SAP Spartacus SplitViewComponent Migration 的一个具体例子
    projects/schematics/src/migrations/3_0/constructor-deprecations/constructor-deprecations.ts

在 CONSTRUCTOR_DEPRECATION_DATA 数组里,添加一个新元素。该元素来源于:./data/split-view.component.migration

注意命名规范:split-view.component.migration, 以 migration.ts 结尾。

SAP Spartacus SplitViewComponent Migration 的一个具体例子
SAP Spartacus SplitViewComponent Migration 的一个具体例子
  1. projects/schematics/src/migrations/3_0/constructor-deprecations/data/split-view.component.migration.ts

声明废弃的参数以及新引入的参数:

SAP Spartacus SplitViewComponent Migration 的一个具体例子

注意,属性值都不能直接用字符串常量,后者必须在 projects/schematics/src/shared/constants.ts 里定义:

SAP Spartacus SplitViewComponent Migration 的一个具体例子