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