diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..a68fe5f
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,17 @@
+# EditorConfig is awesome: https://EditorConfig.org
+
+# top-most EditorConfig file
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+tab_width = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
+insert_final_newline = false
\ No newline at end of file
diff --git a/.npmrc b/.npmrc
index 34862ff..9291011 100644
--- a/.npmrc
+++ b/.npmrc
@@ -1,2 +1,3 @@
+registry=https://registry.npmmirror.com
electron_mirror=https://npmmirror.com/mirrors/electron/
electron_builder_binaries_mirror=https://npmmirror.com/mirrors/electron-builder-binaries/
diff --git a/src/renderer/components/Menus/index.vue b/src/renderer/components/Menus/index.vue
new file mode 100644
index 0000000..a4afc9c
--- /dev/null
+++ b/src/renderer/components/Menus/index.vue
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+

+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/renderer/components/TaskList/index.vue b/src/renderer/components/TaskList/index.vue
new file mode 100644
index 0000000..5f1bff8
--- /dev/null
+++ b/src/renderer/components/TaskList/index.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/renderer/components/Versions.vue b/src/renderer/components/Versions/index.vue
similarity index 100%
rename from src/renderer/components/Versions.vue
rename to src/renderer/components/Versions/index.vue
diff --git a/src/renderer/constant/menus.ts b/src/renderer/constant/menus.ts
new file mode 100644
index 0000000..90bb0fd
--- /dev/null
+++ b/src/renderer/constant/menus.ts
@@ -0,0 +1,62 @@
+import { RiHomeLine, RiFileListLine, RiHotelLine, RiChatQuoteLine, RiBarChartBoxAiLine, RiMoreLine, RiSettingsLine } from '@remixicon/vue'
+
+// 菜单列表申明
+export interface MenuItem {
+ id: number
+ name: string
+ icon: any
+ color: string
+ activeColor: string
+}
+
+export const menus: MenuItem[] = [
+ {
+ id: 1,
+ name: '首页',
+ icon: RiHomeLine,
+ color: '#525866',
+ activeColor: 'text-[#2B7FFF]',
+ },
+ {
+ id: 2,
+ name: '订单',
+ icon: RiFileListLine,
+ color: '#525866',
+ activeColor: 'text-[#2B7FFF]',
+ },
+ {
+ id: 3,
+ name: '库存',
+ icon: RiHotelLine,
+ color: '#525866',
+ activeColor: 'text-[#2B7FFF]',
+ },
+ {
+ id: 4,
+ name: '评价',
+ icon: RiChatQuoteLine,
+ color: '#525866',
+ activeColor: 'text-[#2B7FFF]',
+ },
+ {
+ id: 5,
+ name: '数据看板',
+ icon: RiBarChartBoxAiLine,
+ color: '#525866',
+ activeColor: 'text-[#2B7FFF]',
+ },
+ {
+ id: 6,
+ name: '更多',
+ icon: RiMoreLine,
+ color: '#525866',
+ activeColor: 'text-[#2B7FFF]',
+ },
+ {
+ id: 7,
+ name: '设置',
+ icon: RiSettingsLine,
+ color: '#525866',
+ activeColor: 'text-[#2B7FFF]',
+ },
+]
\ No newline at end of file
diff --git a/src/renderer/index.css b/src/renderer/index.css
index 5308f18..e0461e9 100644
--- a/src/renderer/index.css
+++ b/src/renderer/index.css
@@ -6,3 +6,7 @@ body {
margin: 0;
padding: 0;
}
+
+.bg {
+ background: linear-gradient( 180deg, #EFF6FF 0%, #F5F7FA 40%);
+}
\ No newline at end of file
diff --git a/src/renderer/layout/index.vue b/src/renderer/layout/index.vue
new file mode 100644
index 0000000..88bc12c
--- /dev/null
+++ b/src/renderer/layout/index.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
diff --git a/src/renderer/main.ts b/src/renderer/main.ts
index 8067493..99a7653 100644
--- a/src/renderer/main.ts
+++ b/src/renderer/main.ts
@@ -3,6 +3,7 @@ import { createApp } from "vue";
import { createPinia } from "pinia";
import router from "./router";
import App from "./App.vue";
+import Layout from "./layout/index.vue";
// 创建 Vue 应用实例
const app = createApp(App);
@@ -10,6 +11,9 @@ const app = createApp(App);
// 使用 Pinia 状态管理
app.use(createPinia());
+// 注册 Layout 组件
+app.component('Layout', Layout);
+
// 使用 Vue Router
app.use(router);
diff --git a/src/renderer/router/index.ts b/src/renderer/router/index.ts
index cda5f5a..2cc7317 100644
--- a/src/renderer/router/index.ts
+++ b/src/renderer/router/index.ts
@@ -12,6 +12,12 @@ const routes = [
component: () => import("@/views/browser/BrowserLayout.vue"),
meta: { requiresAuth: true },
},
+ {
+ path: "/home",
+ name: "Home",
+ component: () => import("@/views/home/index.vue"),
+ meta: { requiresAuth: true },
+ },
{
path: "/about",
name: "About",
@@ -30,10 +36,12 @@ router.beforeEach((to, _from, next) => {
next({ path: "/login" });
return;
}
- if (token && to.path !== "/browser") {
- next({ path: "/browser" });
+
+ if (token && to.path !== "/home") {
+ next({ path: "/home" });
return;
}
+
next();
});
diff --git a/src/renderer/styles/index.scss b/src/renderer/styles/index.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/renderer/views/home/index.vue b/src/renderer/views/home/index.vue
index 9ef8b40..15222ea 100644
--- a/src/renderer/views/home/index.vue
+++ b/src/renderer/views/home/index.vue
@@ -1,18 +1,11 @@
-
-
欢迎使用智念科技 AI
-
-
-
-
+
+
+