Skip to content

Commit 61a5851

Browse files
committedMay 15, 2019
更新版本 icon st 等等,解决缺包问题
1 parent 1d8f78c commit 61a5851

9 files changed

+47
-67
lines changed
 

‎README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# flowchart-angular6
22
一个基于jsplumb的使用angular6写的一个可拖拽的流程图实例(目前已更新到Angular 7版本)
33

4-
### 更新:解决ng-zorro版本更新带来的图标加载问题
4+
### 更新:解决ng-zorro版本更新带来的图标加载问题(由于集成了两种icon加载方式,弹出框的icon会出现两个,之后有时间再修改)
5+
56

67
* 网上找了很久都没有找到用angular实现的可拖拽式的流程图组件,于是就基于jsplumb自己写了一个,实现了一些基本的功能,后续可能会再添加点。
78

‎src/app/core/core.module.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
import { NgModule, Optional, SkipSelf } from '@angular/core';
22
import { throwIfAlreadyLoaded } from '@core/module-import-guard';
3-
import { I18NService } from '@core/i18n/i18n.service';
43

54
@NgModule({
6-
providers: [I18NService],
5+
providers: [],
76
})
87
export class CoreModule {
98
constructor(

‎src/app/core/index.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export * from './i18n/i18n.service';
2+
export * from './module-import-guard';
3+
export * from './net/default.interceptor';
4+
export * from './startup/startup.service';

‎src/app/core/startup/startup.service.ts

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ import { MenuService, SettingsService, TitleService, ALAIN_I18N_TOKEN } from '@d
66
import { ACLService } from '@delon/acl';
77
import { TranslateService } from '@ngx-translate/core';
88
import { I18NService } from '@core/i18n/i18n.service';
9-
import { NzIconService } from 'ng-zorro-antd';
10-
import { ICONS_AUTO } from '../../../style-icons-auto';
11-
import { ICONS } from '../../../style-icons';
129

1310
@Injectable()
1411
export class StartupService {
1512
constructor(
16-
iconSrv: NzIconService,
1713
private menuService: MenuService,
1814
private translate: TranslateService,
1915
@Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
@@ -22,7 +18,7 @@ export class StartupService {
2218
private titleService: TitleService,
2319
private httpClient: HttpClient,
2420
private injector: Injector,
25-
) { iconSrv.addIcon(...ICONS_AUTO, ...ICONS); }
21+
) { }
2622

2723
load(): Promise<any> {
2824
return new Promise((resolve, reject) => {

‎src/app/delon.module.ts

+23-23
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,44 @@
11
import { NgModule, Optional, SkipSelf, ModuleWithProviders } from '@angular/core';
2-
import { throwIfAlreadyLoaded } from '@core/module-import-guard';
2+
import { throwIfAlreadyLoaded } from '@core';
33
import { AlainThemeModule } from '@delon/theme';
44
import { DelonMockModule } from '@delon/mock';
55
import * as MOCKDATA from '../../_mock';
66
import { environment } from '@env/environment';
77
const MOCK_MODULES = !environment.production ? [DelonMockModule.forRoot({ data: MOCKDATA })] : [];
88
import { PageHeaderConfig } from '@delon/abc';
99
export function fnPageHeaderConfig(): PageHeaderConfig {
10-
return {
11-
...new PageHeaderConfig(),
12-
...({ homeI18n: 'home' } as PageHeaderConfig),
13-
};
10+
return {
11+
...new PageHeaderConfig(),
12+
...({ homeI18n: 'home' } as PageHeaderConfig),
13+
};
1414
}
1515
import { STConfig } from '@delon/abc';
1616
export function fnSTConfig(): STConfig {
17-
return {
18-
...new STConfig(),
19-
...({
20-
modal: { size: 'lg' },
21-
} as STConfig),
22-
};
17+
return {
18+
...new STConfig(),
19+
...({
20+
modal: { size: 'lg' },
21+
} as STConfig),
22+
};
2323
}
2424

2525
const GLOBAL_CONFIG_PROVIDES = [
26-
{ provide: STConfig, useFactory: fnSTConfig },
27-
{ provide: PageHeaderConfig, useFactory: fnPageHeaderConfig },
26+
{ provide: STConfig, useFactory: fnSTConfig },
27+
{ provide: PageHeaderConfig, useFactory: fnPageHeaderConfig },
2828
];
2929

3030
@NgModule({
31-
imports: [AlainThemeModule.forRoot(), ...MOCK_MODULES],
31+
imports: [AlainThemeModule.forRoot(), ...MOCK_MODULES],
3232
})
3333
export class DelonModule {
34-
constructor(@Optional() @SkipSelf() parentModule: DelonModule) {
35-
throwIfAlreadyLoaded(parentModule, 'DelonModule');
36-
}
34+
constructor(@Optional() @SkipSelf() parentModule: DelonModule) {
35+
throwIfAlreadyLoaded(parentModule, 'DelonModule');
36+
}
3737

38-
static forRoot(): ModuleWithProviders {
39-
return {
40-
ngModule: DelonModule,
41-
providers: [ ...GLOBAL_CONFIG_PROVIDES],
42-
};
43-
}
38+
static forRoot(): ModuleWithProviders {
39+
return {
40+
ngModule: DelonModule,
41+
providers: [...GLOBAL_CONFIG_PROVIDES],
42+
};
43+
}
4444
}

‎src/app/routes/default/default.component.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ export class LayoutDefaultComponent implements OnInit {
163163
}
164164

165165
createSettingModal(toolId): void {
166-
this.modalService.create({
166+
console.log(toolId)
167+
/* this.modalService.create({
167168
nzTitle: '参数设置',
168169
nzContent: NodeParamsetComponent,
169170
nzComponentParams: {
@@ -172,7 +173,20 @@ export class LayoutDefaultComponent implements OnInit {
172173
},
173174
nzMaskClosable: false,
174175
nzFooter: null,
176+
}); */
177+
const modal = this.modalService.create({
178+
nzTitle: '参数设置',
179+
nzContent: NodeParamsetComponent,
180+
nzComponentParams: {
181+
projectId: 'ceshicanshu1',
182+
toolId: toolId
183+
}
175184
});
185+
186+
modal.afterOpen.subscribe(() => console.log('[afterOpen] emitted!'));
187+
188+
// Return a result when closed
189+
modal.afterClose.subscribe(result => console.log('[afterClose] The result is:', result));
176190
}
177191

178192
addPorts(instance, node, ports) {

‎src/style-icons-auto.ts

-23
This file was deleted.

‎src/style-icons.ts

-9
This file was deleted.

‎src/styles.less

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
@font-face {
88
font-family: 'anticon';
99
src: url('./assets/fonts/iconfont.eot');
10-
src: url('./assets/fonts/iconfont.woff') format('woff'),
11-
url('./assets/fonts/iconfont.ttf') format('truetype'),
12-
url('./assets/fonts/iconfont.svg') format('svg');
10+
src: url('./assets/fonts/iconfont.woff') format('woff'), url('./assets/fonts/iconfont.ttf') format('truetype'), url('./assets/fonts/iconfont.svg') format('svg');
1311
}
1412

1513
.anticon {

0 commit comments

Comments
 (0)
Please sign in to comment.