zl程序教程

您现在的位置是:首页 >  其他

当前栏目

SAP 电商云 Spartacus UI feature level directive 的工作原理

SAPUI原理 工作 电商 Spartacus level Feature
2023-09-14 09:04:00 时间

如何消费这个 Directive:

我们可以 mock FeatureLevelDirective 的服务类:

isLevel 的判断逻辑:

进行 Component 单元测试时,我们可以使用下面的 MockFeatureLevelDirective 进行 Mock.

import { MockFeatureLevelDirective } from '../../../../shared/test/mock-feature-level-directive';

import {
  FeaturesConfigModule,
  I18nTestingModule,
  PromotionLocation,
} from '@spartacus/core';

FeaturesConfigModule

更多Jerry的原创文章,尽在:“汪子熙”: