From e79d654d2c4219baf0108260964cc3a6b77f8b48 Mon Sep 17 00:00:00 2001 From: cipchk Date: Fri, 8 Dec 2023 22:12:27 +0800 Subject: [PATCH] chore: fix --- src/app/core/code/code.service.ts | 5 +++-- src/app/core/code/files/app.config.ts | 4 ++-- src/app/layout/header/header.component.ts | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/core/code/code.service.ts b/src/app/core/code/code.service.ts index 075f5ac6f6..277c79108f 100644 --- a/src/app/core/code/code.service.ts +++ b/src/app/core/code/code.service.ts @@ -183,9 +183,10 @@ export class CodeService { return `import { DemoDelonABCModule } from './delon-abc.module'; import { DemoDelonChartModule } from './delon-chart.module'; -import { DemoNgZorroAntdModule } from './ng-zorro-antd.module';\n${code.replace( +import { DemoNgZorroAntdModule } from './ng-zorro-antd.module'; +import { DelonFormModule } from '@delon/form';\n${code.replace( `@Component({`, - `@Component({\n standalone: true,\n // Just automatically generated code, please import as needed\n imports: [DemoNgZorroAntdModule, DemoDelonABCModule, DemoDelonChartModule],` + `@Component({\n standalone: true,\n // Just automatically generated code, please import as needed\n imports: [DemoNgZorroAntdModule, DemoDelonABCModule, DemoDelonChartModule, DelonFormModule],` )}`; } diff --git a/src/app/core/code/files/app.config.ts b/src/app/core/code/files/app.config.ts index 1e86636279..b1db3f573b 100644 --- a/src/app/core/code/files/app.config.ts +++ b/src/app/core/code/files/app.config.ts @@ -16,7 +16,7 @@ import { zh_CN as zorroLang } from 'ng-zorro-antd/i18n'; import { zhCN as dateLang } from 'date-fns/locale'; import ngLang from '@angular/common/locales/zh'; import { NzConfig, provideNzConfig } from 'ng-zorro-antd/core/config'; -import { provideMockConfig } from '@delon/mock'; +import { mockInterceptor, provideMockConfig } from '@delon/mock'; import * as MOCKDATA from '../../_mock'; import { withAutoCompleteWidget } from '@delon/form/widgets/autocomplete'; import { withCascaderWidget } from '@delon/form/widgets/cascader'; @@ -50,7 +50,7 @@ const ngZorroConfig: NzConfig = {}; export const appConfig: ApplicationConfig = { providers: [ - provideHttpClient(withFetch(), withInterceptors([])), + provideHttpClient(withFetch(), withInterceptors([mockInterceptor])), provideAnimations(), provideAlain({ config: alainConfig, defaultLang }), provideNzConfig(ngZorroConfig), diff --git a/src/app/layout/header/header.component.ts b/src/app/layout/header/header.component.ts index f181e7b2d3..b57412d6f4 100644 --- a/src/app/layout/header/header.component.ts +++ b/src/app/layout/header/header.component.ts @@ -27,7 +27,7 @@ import { MetaSearchGroupItem } from '../../interfaces'; import { LayoutComponent } from '../layout.component'; const pkg = require('../../../../package.json'); -const minimumVersion = 13; +const minimumVersion = +pkg.version.split('.')[0] - 2; @Component({ selector: 'app-header',