Browse Source

拆分模块

seimin 1 year ago
parent
commit
32f92b0cd0

+ 2 - 1
package.json

@@ -11,7 +11,8 @@
11 11
     "test": "ng test",
12 12
     "lint": "ng lint",
13 13
     "e2e": "ng e2e",
14
-    "bundle-report": "ng build --prod --stats-json && webpack-bundle-analyzer dist/itsm-zy/stats.json"
14
+    "bundle-report": "ng build --prod --stats-json && webpack-bundle-analyzer dist/itsm-pc/stats.json",
15
+    "bundle-report:17": "set NODE_OPTIONS=--openssl-legacy-provider && ng build --prod --stats-json && webpack-bundle-analyzer dist/itsm-pc/stats.json"
15 16
   },
16 17
   "private": true,
17 18
   "dependencies": {

src/app/directives/drag.directive.ts → src/app/directives/drag/drag.directive.ts


+ 18 - 0
src/app/directives/drag/drag.module.ts

@@ -0,0 +1,18 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+import { DragDirective } from './drag.directive';
4
+
5
+
6
+
7
+@NgModule({
8
+  declarations: [
9
+    DragDirective,
10
+  ],
11
+  imports: [
12
+    CommonModule
13
+  ],
14
+  exports: [
15
+    DragDirective,
16
+  ]
17
+})
18
+export class DragModule { }

+ 0 - 3
src/app/share/share.module.ts

@@ -17,7 +17,6 @@ import { DetailDrugComponent } from './detail-drug/detail-drug.component';
17 17
 import { DetailOthersComponent } from './detail-others/detail-others.component';
18 18
 import { AllocationWorkerComponent } from './allocation-worker/allocation-worker.component';
19 19
 import { DateTransformPipe } from '../pipes/date-transform.pipe';
20
-import { DragDirective } from '../directives/drag.directive';
21 20
 import { AppraiseDetailComponent } from './appraise-detail/appraise-detail.component';
22 21
 import { OrderDetailComponent } from './order-detail/order-detail.component';
23 22
 import { DialogDeleteComponent } from './dialog-delete/dialog-delete.component';
@@ -61,7 +60,6 @@ import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/b
61 60
     AppraiseDetailComponent,
62 61
     OrderDetailComponent,
63 62
     DateTransformPipe,
64
-    DragDirective,
65 63
     DialogDeleteComponent,
66 64
     DialogSurgeryComponent,
67 65
     MaskComponent,
@@ -116,7 +114,6 @@ import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/b
116 114
     OverlayscrollbarsModule,
117 115
     SortablejsModule,
118 116
     DateTransformPipe,
119
-    DragDirective,
120 117
     DialogDeleteComponent,
121 118
     DialogSurgeryComponent,
122 119
     MaskComponent,

+ 2 - 0
src/app/views/hushijiandan/hushijiandan.module.ts

@@ -4,6 +4,7 @@ import { CommonModule } from '@angular/common';
4 4
 import { HushijiandanRoutingModule } from './hushijiandan-routing.module';
5 5
 import { HushijiandanComponent } from './hushijiandan.component';
6 6
 import { ShareModule } from 'src/app/share/share.module';
7
+import { DragModule } from 'src/app/directives/drag/drag.module';
7 8
 
8 9
 
9 10
 @NgModule({
@@ -13,6 +14,7 @@ import { ShareModule } from 'src/app/share/share.module';
13 14
   imports: [
14 15
     CommonModule,
15 16
     ShareModule,
17
+    DragModule,
16 18
     HushijiandanRoutingModule
17 19
   ]
18 20
 })