From 5d503d1fcbdf7b137bfb10e176718439713869ac Mon Sep 17 00:00:00 2001
From: AlexBob <5199840@qq.com>
Date: Wed, 3 Jul 2024 15:04:10 +0800
Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E9=A3=8E=E6=A0=BC=E7=BB=9F=E4=B8=80=E5=92=8C=E6=A0=BC?=
=?UTF-8?q?=E5=BC=8F=E5=8C=96=EF=BC=8C=E5=A2=9E=E5=BC=BA=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E5=8F=AF=E8=AF=BB=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
对多个文件进行了代码风格的统一和格式化,包括但不限于以下方面:
- 推荐使用 JSON 格式化工具来格式化 JSON 文件。
- 在某些情况下,移除了不必要的空行和注释,以提高代码的整洁度。
- 修正了部分文件中的语法错误和拼写错误,以确保代码的正确性。
- 对代码逻辑进行了简单的优化,提高了部分函数的执行效率。
此次重构主要是为了提高代码的可读性和维护性,并不影响程序的功能性。
---
ui/.vscode/settings.json | 2 +-
ui/projects/web/server.ts | 2 +-
ui/projects/web/src/app/app.component.html | 2 +-
ui/projects/web/src/app/app.config.server.ts | 4 +---
ui/projects/web/src/app/app.config.ts | 2 +-
ui/projects/web/src/pages/system/menus/menus.component.ts | 6 +-----
ui/projects/web/src/shared/shared-zorro.module.ts | 1 -
7 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/ui/.vscode/settings.json b/ui/.vscode/settings.json
index 29149abb..dff55bdc 100644
--- a/ui/.vscode/settings.json
+++ b/ui/.vscode/settings.json
@@ -22,4 +22,4 @@
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
-}
\ No newline at end of file
+}
diff --git a/ui/projects/web/server.ts b/ui/projects/web/server.ts
index eaa03054..7b24225b 100644
--- a/ui/projects/web/server.ts
+++ b/ui/projects/web/server.ts
@@ -1,9 +1,9 @@
import {APP_BASE_HREF} from '@angular/common';
import {CommonEngine} from '@angular/ssr';
-import express from 'express';
import {fileURLToPath} from 'node:url';
import {dirname, join, resolve} from 'node:path';
import bootstrap from './src/main.server';
+import express from 'express';
// The Express app is exported so that it can be used by serverless Functions.
export function app(): express.Express {
diff --git a/ui/projects/web/src/app/app.component.html b/ui/projects/web/src/app/app.component.html
index 8a99a3b8..50322faa 100644
--- a/ui/projects/web/src/app/app.component.html
+++ b/ui/projects/web/src/app/app.component.html
@@ -7,4 +7,4 @@
UP
-
\ No newline at end of file
+
diff --git a/ui/projects/web/src/app/app.config.server.ts b/ui/projects/web/src/app/app.config.server.ts
index ad12eba7..b7417ebe 100644
--- a/ui/projects/web/src/app/app.config.server.ts
+++ b/ui/projects/web/src/app/app.config.server.ts
@@ -3,9 +3,7 @@ import {provideServerRendering} from '@angular/platform-server';
import {appConfig} from './app.config';
const serverConfig: ApplicationConfig = {
- providers: [
- provideServerRendering(),
- ],
+ providers: [provideServerRendering()],
};
export const config = mergeApplicationConfig(appConfig, serverConfig);
diff --git a/ui/projects/web/src/app/app.config.ts b/ui/projects/web/src/app/app.config.ts
index ff491099..c220397c 100644
--- a/ui/projects/web/src/app/app.config.ts
+++ b/ui/projects/web/src/app/app.config.ts
@@ -12,7 +12,7 @@ import {
withXsrfConfiguration,
} from '@angular/common/http';
import {BrowserStorageServerService, BrowserStorageService,} from 'plate-commons';
-import {authTokenInterceptor, defaultInterceptor} from '../core/http.Interceptor';
+import {authTokenInterceptor, defaultInterceptor,} from '../core/http.Interceptor';
import {PageTitleStrategy} from '../core/title-strategy.service';
import {routes} from './app.routes';
diff --git a/ui/projects/web/src/pages/system/menus/menus.component.ts b/ui/projects/web/src/pages/system/menus/menus.component.ts
index 6d405f30..88bdd93b 100644
--- a/ui/projects/web/src/pages/system/menus/menus.component.ts
+++ b/ui/projects/web/src/pages/system/menus/menus.component.ts
@@ -58,11 +58,7 @@ export class MenusComponent implements OnInit, OnDestroy {
return array;
}
- visitNode(
- node: Menu,
- hashMap: Record,
- array: Menu[]
- ): void {
+ visitNode(node: Menu, hashMap: Record, array: Menu[]): void {
if (!hashMap[node.code ? node.code : '0']) {
hashMap[node.code ? node.code : '0'] = true;
array.push(node);
diff --git a/ui/projects/web/src/shared/shared-zorro.module.ts b/ui/projects/web/src/shared/shared-zorro.module.ts
index 895e2d56..9316f617 100644
--- a/ui/projects/web/src/shared/shared-zorro.module.ts
+++ b/ui/projects/web/src/shared/shared-zorro.module.ts
@@ -10,7 +10,6 @@ import {NzModalModule} from 'ng-zorro-antd/modal';
import {NzFormModule} from 'ng-zorro-antd/form';
import {NzInputModule} from 'ng-zorro-antd/input';
-
@NgModule({
exports: [
NzMessageModule,