-
+
import("@/layout/index.vue");
@@ -65,8 +61,7 @@ export const constantRoutes: RouteRecordRaw[] = [
{
path: "myNotice",
name: "MyNotice",
- component: () =>
- import("@/views/system/notice/components/MyNotice.vue"),
+ component: () => import("@/views/system/notice/components/MyNotice.vue"),
meta: { title: "我的通知", icon: "user", hidden: true },
},
],
diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts
index 31db0e7b..6bf9a60d 100644
--- a/src/store/modules/app.ts
+++ b/src/store/modules/app.ts
@@ -38,9 +38,7 @@ export const useAppStore = defineStore("app", () => {
// 切换侧边栏
function toggleSidebar() {
sidebar.opened = !sidebar.opened;
- sidebarStatus.value = sidebar.opened
- ? SidebarStatusEnum.OPENED
- : SidebarStatusEnum.CLOSED;
+ sidebarStatus.value = sidebar.opened ? SidebarStatusEnum.OPENED : SidebarStatusEnum.CLOSED;
}
// 关闭侧边栏
diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts
index 9a2eee6a..9dd56638 100644
--- a/src/store/modules/settings.ts
+++ b/src/store/modules/settings.ts
@@ -10,15 +10,9 @@ export const useSettingsStore = defineStore("setting", () => {
// 标签
const tagsView = useStorage("tagsView", defaultSettings.tagsView);
// 侧边栏 Logo
- const sidebarLogo = useStorage(
- "sidebarLogo",
- defaultSettings.sidebarLogo
- );
+ const sidebarLogo = useStorage("sidebarLogo", defaultSettings.sidebarLogo);
// 固定头部
- const fixedHeader = useStorage(
- "fixedHeader",
- defaultSettings.fixedHeader
- );
+ const fixedHeader = useStorage("fixedHeader", defaultSettings.fixedHeader);
// 布局
const layout = useStorage("layout", defaultSettings.layout);
// 水印
@@ -28,10 +22,7 @@ export const useSettingsStore = defineStore("setting", () => {
);
// 主题
- const themeColor = useStorage(
- "themeColor",
- defaultSettings.themeColor
- );
+ const themeColor = useStorage("themeColor", defaultSettings.themeColor);
const theme = useStorage("theme", defaultSettings.theme);
// 监听主题变化
@@ -53,13 +44,7 @@ export const useSettingsStore = defineStore("setting", () => {
watermarkEnabled,
};
- function changeSetting({
- key,
- value,
- }: {
- key: string;
- value: SettingsValue;
- }) {
+ function changeSetting({ key, value }: { key: string; value: SettingsValue }) {
const setting = settingsMap[key];
if (setting) setting.value = value;
}
diff --git a/src/store/modules/tags-view.ts b/src/store/modules/tags-view.ts
index cfdd7724..82fb50be 100644
--- a/src/store/modules/tags-view.ts
+++ b/src/store/modules/tags-view.ts
@@ -124,9 +124,7 @@ export const useTagsViewStore = defineStore("tagsView", () => {
function delLeftViews(view: TagView) {
return new Promise((resolve) => {
- const currIndex = visitedViews.value.findIndex(
- (v) => v.path === view.path
- );
+ const currIndex = visitedViews.value.findIndex((v) => v.path === view.path);
if (currIndex === -1) {
return;
}
@@ -149,9 +147,7 @@ export const useTagsViewStore = defineStore("tagsView", () => {
function delRightViews(view: TagView) {
return new Promise((resolve) => {
- const currIndex = visitedViews.value.findIndex(
- (v) => v.path === view.path
- );
+ const currIndex = visitedViews.value.findIndex((v) => v.path === view.path);
if (currIndex === -1) {
return;
}
diff --git a/src/utils/websocket.ts b/src/utils/websocket.ts
index b0da4efa..bd8fadb6 100644
--- a/src/utils/websocket.ts
+++ b/src/utils/websocket.ts
@@ -3,8 +3,7 @@ import { getToken } from "@/utils/auth";
class WebSocketManager {
private client: Client | null = null;
- private messageHandlers: Map void)[]> =
- new Map();
+ private messageHandlers: Map void)[]> = new Map();
private reconnectAttempts = 0;
private maxReconnectAttempts = 3; // 自定义最大重试次数
private reconnectDelay = 5000; // 重试延迟(单位:毫秒)
@@ -15,9 +14,7 @@ class WebSocketManager {
// 如果没有配置 WebSocket 端点或显式关闭,直接返回
if (!endpoint) {
- console.log(
- "WebSocket 已被禁用,如需打开请在配置文件中配置 VITE_APP_WS_ENDPOINT"
- );
+ console.log("WebSocket 已被禁用,如需打开请在配置文件中配置 VITE_APP_WS_ENDPOINT");
return;
}
diff --git a/src/views/codegen/index.vue b/src/views/codegen/index.vue
index c15cd043..f7f24f19 100644
--- a/src/views/codegen/index.vue
+++ b/src/views/codegen/index.vue
@@ -42,11 +42,7 @@
-
+
@@ -115,10 +111,7 @@
-
+
@@ -126,18 +119,12 @@
-
+
-
+
@@ -145,18 +132,12 @@
-
+
-
+
@@ -256,11 +237,7 @@