Optimize structure
This commit is contained in:
@ -86,7 +86,7 @@ const COMPONENTS: Type<void>[] = [
|
|||||||
imports: [
|
imports: [
|
||||||
SharedModule,
|
SharedModule,
|
||||||
DatatableRoutingModule,
|
DatatableRoutingModule,
|
||||||
SHARED_G2_MODULES
|
...SHARED_G2_MODULES
|
||||||
],
|
],
|
||||||
declarations: COMPONENTS,
|
declarations: COMPONENTS,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -9,6 +9,6 @@ const COMPONENTS: any = [DashboardComponent];
|
|||||||
const NOTROUTECOMPONENTS: any = [];
|
const NOTROUTECOMPONENTS: any = [];
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS],
|
declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS],
|
||||||
imports: [CommonModule, RegulatoryDataRoutingModule, SharedModule, SHARED_G2_MODULES]
|
imports: [CommonModule, RegulatoryDataRoutingModule, SharedModule, ...SHARED_G2_MODULES]
|
||||||
})
|
})
|
||||||
export class RegulatoryDataModule {}
|
export class RegulatoryDataModule {}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { NgModule, Type } from '@angular/core';
|
import { NgModule, Type } from '@angular/core';
|
||||||
import { SharedModule, STWidgetModule } from '@shared';
|
import { BasicModuleModule, SharedModule, STWidgetModule } from '@shared';
|
||||||
|
|
||||||
// dashboard pages
|
// dashboard pages
|
||||||
import { DashboardComponent } from './dashboard/dashboard.component';
|
import { DashboardComponent } from './dashboard/dashboard.component';
|
||||||
@ -14,9 +14,8 @@ const COMPONENTS_NOROUNT: Array<Type<void>> = [];
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
LayoutModule,
|
LayoutModule,
|
||||||
SharedModule,
|
BasicModuleModule,
|
||||||
GlobalConfigModule.forRoot(),
|
GlobalConfigModule.forRoot(),
|
||||||
STWidgetModule,
|
|
||||||
RouteRoutingModule
|
RouteRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT],
|
declarations: [...COMPONENTS, ...COMPONENTS_NOROUNT],
|
||||||
|
|||||||
@ -35,7 +35,7 @@ const COMPONENTS: Type<void>[] = [
|
|||||||
imports: [
|
imports: [
|
||||||
SharedModule,
|
SharedModule,
|
||||||
TaxManagementModuleRoutingModule,
|
TaxManagementModuleRoutingModule,
|
||||||
SHARED_G2_MODULES
|
...SHARED_G2_MODULES
|
||||||
],
|
],
|
||||||
declarations: COMPONENTS,
|
declarations: COMPONENTS,
|
||||||
})
|
})
|
||||||
|
|||||||
12
src/app/shared/basic-module.module.ts
Normal file
12
src/app/shared/basic-module.module.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
import { RouterModule } from '@angular/router';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [],
|
||||||
|
imports: [CommonModule, FormsModule, RouterModule, HttpClientModule, ReactiveFormsModule],
|
||||||
|
exports: [CommonModule, FormsModule, HttpClientModule, ReactiveFormsModule, RouterModule]
|
||||||
|
})
|
||||||
|
export class BasicModuleModule {}
|
||||||
@ -5,10 +5,12 @@ import { SHARED_ZORRO_MODULES } from '../../shared-zorro.module';
|
|||||||
import { SearchDrawerComponent } from './search-drawer.component';
|
import { SearchDrawerComponent } from './search-drawer.component';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
import { DelonACLModule } from '@delon/acl';
|
import { DelonACLModule } from '@delon/acl';
|
||||||
|
import { DelonFormModule } from '@delon/form';
|
||||||
|
import { STWidgetModule } from '../../widget/st-widget.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [SearchDrawerComponent],
|
declarations: [SearchDrawerComponent],
|
||||||
imports: [CommonModule, FormsModule, DelonACLModule, ...SHARED_DELON_MODULES, ...SHARED_ZORRO_MODULES],
|
imports: [CommonModule, FormsModule, DelonACLModule, DelonFormModule, STWidgetModule, ...SHARED_DELON_MODULES, ...SHARED_ZORRO_MODULES],
|
||||||
exports: [SearchDrawerComponent]
|
exports: [SearchDrawerComponent]
|
||||||
})
|
})
|
||||||
export class SearchDrawerModule {}
|
export class SearchDrawerModule {}
|
||||||
|
|||||||
@ -30,6 +30,7 @@ export * from './services';
|
|||||||
export * from './pipes';
|
export * from './pipes';
|
||||||
|
|
||||||
// Module
|
// Module
|
||||||
|
export * from './basic-module.module';
|
||||||
export * from './shared.module';
|
export * from './shared.module';
|
||||||
export * from './shared-delon.module';
|
export * from './shared-delon.module';
|
||||||
export * from './shared-zorro.module';
|
export * from './shared-zorro.module';
|
||||||
|
|||||||
@ -41,9 +41,11 @@ import { CaptchaModule } from './components/captcha';
|
|||||||
import { rebateTableModule } from './components/rebate-table';
|
import { rebateTableModule } from './components/rebate-table';
|
||||||
import { SearchDrawerModule } from './components/search-drawer';
|
import { SearchDrawerModule } from './components/search-drawer';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { HttpClientModule } from '@angular/common/http';
|
||||||
|
import { BasicModuleModule } from './basic-module.module';
|
||||||
|
import { STWidgetModule } from './widget/st-widget.module';
|
||||||
|
import { GlobalConfigModule } from '../global-config.module';
|
||||||
// import { SearchDrawerComponent } from './components/search-drawer/search-drawer.component';
|
// import { SearchDrawerComponent } from './components/search-drawer/search-drawer.component';
|
||||||
|
|
||||||
|
|
||||||
const MODULES = [
|
const MODULES = [
|
||||||
AddressModule,
|
AddressModule,
|
||||||
DelayModule,
|
DelayModule,
|
||||||
@ -60,20 +62,17 @@ const MODULES = [
|
|||||||
rebateTableModule,
|
rebateTableModule,
|
||||||
CaptchaModule,
|
CaptchaModule,
|
||||||
SearchDrawerModule,
|
SearchDrawerModule,
|
||||||
|
|
||||||
...PRO_SHARED_MODULES
|
...PRO_SHARED_MODULES
|
||||||
];
|
];
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, AccountDetailComponent];
|
const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, AccountDetailComponent];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
BasicModuleModule,
|
||||||
FormsModule,
|
STWidgetModule,
|
||||||
RouterModule,
|
|
||||||
HttpClientModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
AlainThemeModule.forChild(),
|
AlainThemeModule.forChild(),
|
||||||
DelonACLModule,
|
DelonACLModule,
|
||||||
DelonFormModule,
|
DelonFormModule,
|
||||||
@ -83,11 +82,8 @@ const SHAREDCOMPONENTS = [LogisticsTimeLineComponent, DictSelectComponent, Accou
|
|||||||
// third libs
|
// third libs
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
CommonModule,
|
BasicModuleModule,
|
||||||
FormsModule,
|
STWidgetModule,
|
||||||
HttpClientModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
RouterModule,
|
|
||||||
AlainThemeModule,
|
AlainThemeModule,
|
||||||
DelonACLModule,
|
DelonACLModule,
|
||||||
DelonFormModule,
|
DelonFormModule,
|
||||||
|
|||||||
@ -33,6 +33,9 @@ import { NounWidget } from './noun/noun.widget';
|
|||||||
import { PropertyValuesWidget } from './property-values/property-values.widget';
|
import { PropertyValuesWidget } from './property-values/property-values.widget';
|
||||||
import { SpecValuesWidget } from './spec-values/spec-values.widget';
|
import { SpecValuesWidget } from './spec-values/spec-values.widget';
|
||||||
import { TinymceWidget } from './tinymce/tinymce.widget';
|
import { TinymceWidget } from './tinymce/tinymce.widget';
|
||||||
|
import { SHARED_ZORRO_MODULES } from '../shared-zorro.module';
|
||||||
|
import { SharedThirdModule } from '../shared-third.module';
|
||||||
|
import { DictSelectComponent } from '../components/dict-select/dict-select.component';
|
||||||
|
|
||||||
export const STWIDGET_COMPONENTS = [
|
export const STWIDGET_COMPONENTS = [
|
||||||
EditorWidget,
|
EditorWidget,
|
||||||
@ -45,7 +48,8 @@ export const STWIDGET_COMPONENTS = [
|
|||||||
PropertyValuesWidget,
|
PropertyValuesWidget,
|
||||||
SLFromToSearchWidget,
|
SLFromToSearchWidget,
|
||||||
DictSelectWidget,
|
DictSelectWidget,
|
||||||
STCurrencyCHYWidget
|
STCurrencyCHYWidget,
|
||||||
|
DictSelectComponent,
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
@ -53,6 +57,8 @@ export const STWIDGET_COMPONENTS = [
|
|||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
...SHARED_ZORRO_MODULES,
|
||||||
|
SharedThirdModule,
|
||||||
DelonFormModule.forRoot(),
|
DelonFormModule.forRoot(),
|
||||||
AddressModule,
|
AddressModule,
|
||||||
EditorModule,
|
EditorModule,
|
||||||
@ -63,8 +69,7 @@ export const STWIDGET_COMPONENTS = [
|
|||||||
NzInputModule,
|
NzInputModule,
|
||||||
NzDatePickerModule,
|
NzDatePickerModule,
|
||||||
NzInputNumberModule,
|
NzInputNumberModule,
|
||||||
NgxTinymceModule,
|
NgxTinymceModule
|
||||||
SharedModule
|
|
||||||
],
|
],
|
||||||
exports: [...STWIDGET_COMPONENTS],
|
exports: [...STWIDGET_COMPONENTS],
|
||||||
entryComponents: STWIDGET_COMPONENTS
|
entryComponents: STWIDGET_COMPONENTS
|
||||||
@ -82,7 +87,6 @@ export class STWidgetModule {
|
|||||||
widgetRegistry.register(SLFromToSearchWidget.KEY, SLFromToSearchWidget);
|
widgetRegistry.register(SLFromToSearchWidget.KEY, SLFromToSearchWidget);
|
||||||
widgetRegistry.register(DictSelectWidget.KEY, DictSelectWidget);
|
widgetRegistry.register(DictSelectWidget.KEY, DictSelectWidget);
|
||||||
|
|
||||||
|
|
||||||
sTWidgetRegistry.register(STCurrencyCHYWidget.KEY, STCurrencyCHYWidget);
|
sTWidgetRegistry.register(STCurrencyCHYWidget.KEY, STCurrencyCHYWidget);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user