diff --git a/electron.vite.config.ts b/electron.vite.config.ts
index 9ee1f3e..77601dd 100644
--- a/electron.vite.config.ts
+++ b/electron.vite.config.ts
@@ -2,7 +2,7 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-02 13:17:44
* @LastEditors: donghao donghao@supervision.ltd
- * @LastEditTime: 2025-07-03 10:00:13
+ * @LastEditTime: 2025-07-03 17:51:36
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\electron.vite.config.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AEmpo
*/
@@ -37,9 +37,6 @@ export default defineConfig({
enabled: true
},
resolvers: [ElementPlusResolver()]
- }),
- Components({
- resolvers: [ElementPlusResolver()]
})
],
build: {
diff --git a/package-lock.json b/package-lock.json
index d6c86a0..32c2e2d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -41,6 +41,7 @@
"unplugin-auto-import": "^19.3.0",
"unplugin-vue-components": "^28.8.0",
"vite": "^5.0.12",
+ "vite-plugin-sass": "^0.1.0",
"vue": "^3.4.15",
"vue-tsc": "^1.8.27"
}
@@ -8637,6 +8638,12 @@
}
}
},
+ "node_modules/vite-plugin-sass": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmmirror.com/vite-plugin-sass/-/vite-plugin-sass-0.1.0.tgz",
+ "integrity": "sha512-gLwvs3ozfDAOZCqs+PepkTd4078m8tfq50IlmTW/OphlWsW95uP7lQ5A3NezfUfTZDTCOA4nFlYnOWRpsKYOqw==",
+ "dev": true
+ },
"node_modules/vue": {
"version": "3.5.17",
"resolved": "https://registry.npmmirror.com/vue/-/vue-3.5.17.tgz",
diff --git a/package.json b/package.json
index f04f099..e044f9c 100644
--- a/package.json
+++ b/package.json
@@ -86,6 +86,7 @@
"unplugin-auto-import": "^19.3.0",
"unplugin-vue-components": "^28.8.0",
"vite": "^5.0.12",
+ "vite-plugin-sass": "^0.1.0",
"vue": "^3.4.15",
"vue-tsc": "^1.8.27"
}
diff --git a/src/renderer/src/components/Theme/themeSwitcher.vue b/src/renderer/src/components/Theme/themeSwitcher.vue
new file mode 100644
index 0000000..4eee45d
--- /dev/null
+++ b/src/renderer/src/components/Theme/themeSwitcher.vue
@@ -0,0 +1,113 @@
+
+
+
+
选择主题
+
+
+
+ 自定义颜色
+
+
+
+
+
+
+
diff --git a/src/renderer/src/main.ts b/src/renderer/src/main.ts
index ebfcfcd..186dbdc 100644
--- a/src/renderer/src/main.ts
+++ b/src/renderer/src/main.ts
@@ -2,24 +2,25 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-02 13:17:44
* @LastEditors: donghao donghao@supervision.ltd
- * @LastEditTime: 2025-07-03 09:54:52
+ * @LastEditTime: 2025-07-03 17:18:59
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\main.ts
* @Description: 入口文件
*/
-import ElementPlus from "element-plus";
-// import "@/styles/tailwind.scss";
-import "element-plus/dist/index.css";
-import "element-plus/theme-chalk/dark/css-vars.css"; // 暗黑主题
-import "./styles/tailwind.scss";
-import "./styles/main.scss"
+import ElementPlus from 'element-plus'
+import './styles/tailwind.scss'
+import './styles/main.scss'
import { createApp } from 'vue'
import App from './App.vue'
import router from '@router'
import { createPinia } from 'pinia'
-import zhCn from "@/plugins/zhCnElement"; // 引入中文语言包
+import zhCn from '@/plugins/zhCnElement' // 引入中文语言包
-createApp(App).use(router).use(createPinia()).use(ElementPlus, {
+createApp(App)
+ .use(router)
+ .use(createPinia())
+ .use(ElementPlus, {
locale: zhCn,
- size: "large", // 全局组件尺寸
- zIndex: 3000, // 全局z-index
- }).mount('#app')
+ size: 'large', // 全局组件尺寸
+ zIndex: 3000 // 全局z-index
+ })
+ .mount('#app')
diff --git a/src/renderer/src/styles/element-plus.scss b/src/renderer/src/styles/element-plus.scss
new file mode 100644
index 0000000..3aed81c
--- /dev/null
+++ b/src/renderer/src/styles/element-plus.scss
@@ -0,0 +1,15 @@
+@import url('element-plus/dist/index.css');
+@import url('element-plus/theme-chalk/dark/css-vars.css'); // 暗黑主题
+// 重置主题色变量
+:root {
+ --el-color-primary: #154ddd; // 主色调
+}
+
+/* 弹框 */
+.design-dialog {
+ padding: 0 !important;
+ overflow: hidden;
+ .el-dialog__header {
+ background-color: var(--el-color-primary);
+ }
+}
diff --git a/src/renderer/src/styles/global.scss b/src/renderer/src/styles/global.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/renderer/src/styles/main.scss b/src/renderer/src/styles/main.scss
index 040355e..964cd92 100644
--- a/src/renderer/src/styles/main.scss
+++ b/src/renderer/src/styles/main.scss
@@ -1,3 +1,4 @@
+@import url("./global.scss");
@import url("./base.scss");
-
+@import url("./element-plus.scss");
@import url("./design.scss");
\ No newline at end of file
diff --git a/src/renderer/src/views/Design/Controls/headCtrl.vue b/src/renderer/src/views/Design/Controls/headCtrl.vue
index 5409994..e632aeb 100644
--- a/src/renderer/src/views/Design/Controls/headCtrl.vue
+++ b/src/renderer/src/views/Design/Controls/headCtrl.vue
@@ -19,7 +19,7 @@
- 设置
+ emit('setting')">设置
工具
@@ -54,6 +54,12 @@
+
+
diff --git a/src/renderer/src/views/Design/index.vue b/src/renderer/src/views/Design/index.vue
index 6328006..c999093 100644
--- a/src/renderer/src/views/Design/index.vue
+++ b/src/renderer/src/views/Design/index.vue
@@ -2,14 +2,14 @@
* @Author: donghao donghao@supervision.ltd
* @Date: 2025-07-02 16:17:29
* @LastEditors: donghao donghao@supervision.ltd
- * @LastEditTime: 2025-07-03 13:49:21
+ * @LastEditTime: 2025-07-03 14:19:48
* @FilePath: \electron-project\Robot-Al\Robot-Al-Platform-Web\src\renderer\src\views\Design\index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
+
+