edit
This commit is contained in:
@ -4,10 +4,13 @@ import { cacheConf } from '@conf/cache.conf';
|
|||||||
import { sysConf } from '@conf/sys.conf';
|
import { sysConf } from '@conf/sys.conf';
|
||||||
import { ACLService } from '@delon/acl';
|
import { ACLService } from '@delon/acl';
|
||||||
import { MenuService, SettingsService, TitleService, _HttpClient } from '@delon/theme';
|
import { MenuService, SettingsService, TitleService, _HttpClient } from '@delon/theme';
|
||||||
|
import { AlainConfigService } from '@delon/util';
|
||||||
import { environment } from '@env/environment';
|
import { environment } from '@env/environment';
|
||||||
import { AmapService, EACacheService, EAUserService } from '@shared';
|
import { AmapService, EACacheService, EAUserService } from '@shared';
|
||||||
import { NzSafeAny } from 'ng-zorro-antd/core/types';
|
import { NzSafeAny } from 'ng-zorro-antd/core/types';
|
||||||
import { NzIconService } from 'ng-zorro-antd/icon';
|
import { NzIconService } from 'ng-zorro-antd/icon';
|
||||||
|
import { NzImageService } from 'ng-zorro-antd/image';
|
||||||
|
import { NzUploadFile } from 'ng-zorro-antd/upload';
|
||||||
import { Observable, zip } from 'rxjs';
|
import { Observable, zip } from 'rxjs';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
|
||||||
@ -31,10 +34,22 @@ export class StartupService {
|
|||||||
private userSrv: EAUserService,
|
private userSrv: EAUserService,
|
||||||
private amapService: AmapService,
|
private amapService: AmapService,
|
||||||
public cacheSrv: EACacheService,
|
public cacheSrv: EACacheService,
|
||||||
private coreSrv: CoreService
|
private coreSrv: CoreService,
|
||||||
|
private nzImageService: NzImageService,
|
||||||
|
private alainConfigService: AlainConfigService
|
||||||
) {
|
) {
|
||||||
iconSrv.addIcon(...ICONS_AUTO, ...ICONS);
|
iconSrv.addIcon(...ICONS_AUTO, ...ICONS);
|
||||||
this.settingService.setLayout('fixSiderbar', true);
|
this.settingService.setLayout('fixSiderbar', true);
|
||||||
|
// 全局修改sf图片预览方式
|
||||||
|
alainConfigService.set('sf', {
|
||||||
|
ui: {
|
||||||
|
preview: (file: NzUploadFile) => {
|
||||||
|
if (file.url) {
|
||||||
|
this.nzImageService.preview([{ src: file.url }]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: 退出登录时需要清理用户信息
|
// TODO: 退出登录时需要清理用户信息
|
||||||
|
|||||||
Reference in New Issue
Block a user