From c7d4946bee4bf9b21fe52d7f79e99be55f8066c0 Mon Sep 17 00:00:00 2001 From: lijun Date: Sat, 21 Dec 2024 12:53:01 +0800 Subject: [PATCH] update code --- package.json | 1 + src/App.vue | 9 + .../NavBar/components/NavbarRight.vue | 1 + src/store/modules/settings.ts | 5 +- src/utils/eventBus.js | 4 + src/views/simulationEvaluation/reportDesc.vue | 1282 +++++++++-------- yarn.lock | 2 +- 7 files changed, 687 insertions(+), 617 deletions(-) create mode 100644 src/utils/eventBus.js diff --git a/package.json b/package.json index 982a568..d3283d9 100644 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "js-md5": "^0.8.3", "json-editor-vue3": "^1.1.1", "lodash-es": "^4.17.21", + "mitt": "^3.0.1", "net": "^1.0.2", "nprogress": "^0.2.0", "path-browserify": "^1.0.1", diff --git a/src/App.vue b/src/App.vue index 7dee94f..a78d531 100644 --- a/src/App.vue +++ b/src/App.vue @@ -168,5 +168,14 @@ html.dark { } } } + .jv-container.jv-light{ + background: #263445; + } + .add-report .row-norm .el-form-item__content{ + background: #263445; + } + .add-report .div-nav-header{ + color:#fff; + } } diff --git a/src/layout/components/NavBar/components/NavbarRight.vue b/src/layout/components/NavBar/components/NavbarRight.vue index 3c4ae3c..2c59239 100644 --- a/src/layout/components/NavBar/components/NavbarRight.vue +++ b/src/layout/components/NavBar/components/NavbarRight.vue @@ -54,6 +54,7 @@ import defaultSettings from "@/settings"; import UserAPI from "@/api/myUser"; import { DeviceEnum } from "@/enums/DeviceEnum"; import { ThemeEnum } from "@/enums/ThemeEnum"; + const appStore = useAppStore(); const tagsViewStore = useTagsViewStore(); // Stores diff --git a/src/store/modules/settings.ts b/src/store/modules/settings.ts index a581e90..b180e6b 100644 --- a/src/store/modules/settings.ts +++ b/src/store/modules/settings.ts @@ -1,7 +1,7 @@ import defaultSettings from "@/settings"; import { ThemeEnum } from "@/enums/ThemeEnum"; import Color from "color"; - +import eventBus from '@/utils/eventBus.js' type SettingsValue = boolean | string; export const useSettingsStore = defineStore("setting", () => { @@ -89,6 +89,7 @@ export const useSettingsStore = defineStore("setting", () => { */ function changeTheme(val: string) { theme.value = val; + eventBus.emit("changeTheme",val) } /** @@ -106,7 +107,7 @@ export const useSettingsStore = defineStore("setting", () => { */ function changeLayout(val: string) { layout.value = val; - } + } return { settingsVisible, diff --git a/src/utils/eventBus.js b/src/utils/eventBus.js new file mode 100644 index 0000000..7911135 --- /dev/null +++ b/src/utils/eventBus.js @@ -0,0 +1,4 @@ +// eventBus.js +import mitt from 'mitt'; +const bus = mitt(); +export default bus; diff --git a/src/views/simulationEvaluation/reportDesc.vue b/src/views/simulationEvaluation/reportDesc.vue index 4e4cdcc..900cf3f 100644 --- a/src/views/simulationEvaluation/reportDesc.vue +++ b/src/views/simulationEvaluation/reportDesc.vue @@ -1,701 +1,755 @@ \ No newline at end of file + + diff --git a/yarn.lock b/yarn.lock index 5f02bd0..73d15dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6525,7 +6525,7 @@ minimist@^1.2.0, minimist@^1.2.6: mitt@^3.0.1: version "3.0.1" - resolved "https://registry.npmmirror.com/mitt/-/mitt-3.0.1.tgz" + resolved "https://registry.npmmirror.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1" integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw== mixin-deep@^1.2.0: