rd-outer-component 0.0.68 → 0.0.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/modules/rd-notification/notification.module.mjs +10 -9
- package/fesm2015/rd-outer-component.mjs +8 -7
- package/fesm2015/rd-outer-component.mjs.map +1 -1
- package/fesm2020/rd-outer-component.mjs +8 -7
- package/fesm2020/rd-outer-component.mjs.map +1 -1
- package/lib/modules/rd-notification/notification.module.d.ts +6 -5
- package/package.json +1 -1
|
@@ -1956,18 +1956,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1956
1956
|
}]
|
|
1957
1957
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i0.EnvironmentInjector }]; } });
|
|
1958
1958
|
|
|
1959
|
-
// notification.module.ts
|
|
1959
|
+
// notification.module.ts (在 NPM 包中)
|
|
1960
1960
|
class RdNotificationModule {
|
|
1961
1961
|
constructor(parentModule) {
|
|
1962
1962
|
if (parentModule) {
|
|
1963
1963
|
throw new Error('RdNotificationModule is already loaded. Import it in the AppModule only');
|
|
1964
1964
|
}
|
|
1965
1965
|
}
|
|
1966
|
-
//
|
|
1967
|
-
static forRoot() {
|
|
1966
|
+
// 修复:使用正确的类型和静态方法
|
|
1967
|
+
static forRoot(config) {
|
|
1968
1968
|
return {
|
|
1969
1969
|
ngModule: RdNotificationModule,
|
|
1970
|
-
providers: [
|
|
1970
|
+
providers: [
|
|
1971
|
+
RdNotificationService,
|
|
1972
|
+
// 如果有配置,可以在这里提供
|
|
1973
|
+
config ? { provide: 'RD_NOTIFICATION_CONFIG', useValue: config } : [],
|
|
1974
|
+
],
|
|
1971
1975
|
};
|
|
1972
1976
|
}
|
|
1973
1977
|
}
|
|
@@ -1980,9 +1984,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
1980
1984
|
imports: [CommonModule, NzNotificationModule],
|
|
1981
1985
|
declarations: [RdNotificationComponent],
|
|
1982
1986
|
exports: [RdNotificationComponent],
|
|
1983
|
-
providers: [
|
|
1984
|
-
// Service 已经在 @Injectable 中提供了,这里不需要重复提供
|
|
1985
|
-
],
|
|
1986
1987
|
}]
|
|
1987
1988
|
}], ctorParameters: function () { return [{ type: RdNotificationModule, decorators: [{
|
|
1988
1989
|
type: Optional
|