From 6547123a8394b840596b3e978dacb089e538b2b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=91=E5=B0=8F=E9=A9=AC?= Date: Wed, 23 Jul 2025 17:15:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=B8=E5=85=B3=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/package.json | 5 +- web/src/App.vue | 4 +- web/src/main.js | 6 +- web/src/router/index.js | 24 ++ web/src/style.css | 11 + web/src/views/appcenter.vue | 646 ++++++++++++++++++++++++++++ web/src/views/components/layout.vue | 120 ++++++ web/src/views/home.vue | 70 +++ web/src/views/index.vue | 13 + web/vite.config.js | 5 +- 10 files changed, 896 insertions(+), 8 deletions(-) create mode 100644 web/src/router/index.js create mode 100644 web/src/views/appcenter.vue create mode 100644 web/src/views/components/layout.vue create mode 100644 web/src/views/home.vue create mode 100644 web/src/views/index.vue diff --git a/web/package.json b/web/package.json index bd277a7..65b299e 100644 --- a/web/package.json +++ b/web/package.json @@ -9,8 +9,11 @@ "preview": "vite preview" }, "dependencies": { + "@tailwindcss/vite": "^4.1.11", + "element-plus": "^2.10.4", "vue": "^3.5.17", - "@tailwindcss/vite": "^4.1.11" + "vue-router": "4", + "vuedraggable": "^4.1.0" }, "devDependencies": { "@vitejs/plugin-vue": "^6.0.0", diff --git a/web/src/App.vue b/web/src/App.vue index 7c1d25e..a1c3f8d 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -2,9 +2,7 @@ diff --git a/web/src/main.js b/web/src/main.js index 2425c0f..ddac3eb 100644 --- a/web/src/main.js +++ b/web/src/main.js @@ -1,5 +1,7 @@ import { createApp } from 'vue' import './style.css' import App from './App.vue' - -createApp(App).mount('#app') +import router from './router/index.js' +import ElementPlus from 'element-plus' +import 'element-plus/dist/index.css' +createApp(App).use(router).use(ElementPlus).mount('#app') diff --git a/web/src/router/index.js b/web/src/router/index.js new file mode 100644 index 0000000..4ff9c03 --- /dev/null +++ b/web/src/router/index.js @@ -0,0 +1,24 @@ +import { createMemoryHistory, createRouter } from 'vue-router' + +import index from '../views/index.vue' +import home from '../views/home.vue' +import appcenter from '../views/appcenter.vue' + +const routes = [ + { + path: '/', component: index, + children:[ + {path: '', redirect: '/home'}, + { path: '/home', component: home }, + { path: '/app-center', component: appcenter } + ] + }, +] + + +const router = createRouter({ + history: createMemoryHistory(), + routes, +}) + +export default router; diff --git a/web/src/style.css b/web/src/style.css index d4b5078..6b66af3 100644 --- a/web/src/style.css +++ b/web/src/style.css @@ -1 +1,12 @@ @import 'tailwindcss'; +/* + * 配置教程 https://juejin.cn/post/7480450288421109787 +*/ +@theme inline { + --color-primary: #085ce6; + --color-secondary: #FFB81C; + --color-dark: #12192C; + --color-light: #F5F7FA; + --color-muted: #6B7280; + --font-display: 'Inter', 'system-ui', 'sans-serif'; +} diff --git a/web/src/views/appcenter.vue b/web/src/views/appcenter.vue new file mode 100644 index 0000000..3bfe5f4 --- /dev/null +++ b/web/src/views/appcenter.vue @@ -0,0 +1,646 @@ + + + + + \ No newline at end of file diff --git a/web/src/views/components/layout.vue b/web/src/views/components/layout.vue new file mode 100644 index 0000000..c7fe72d --- /dev/null +++ b/web/src/views/components/layout.vue @@ -0,0 +1,120 @@ + + + + + \ No newline at end of file diff --git a/web/src/views/home.vue b/web/src/views/home.vue new file mode 100644 index 0000000..b94df26 --- /dev/null +++ b/web/src/views/home.vue @@ -0,0 +1,70 @@ + + + + + \ No newline at end of file diff --git a/web/src/views/index.vue b/web/src/views/index.vue new file mode 100644 index 0000000..d6ed760 --- /dev/null +++ b/web/src/views/index.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/web/vite.config.js b/web/vite.config.js index fa2786c..9764ee1 100644 --- a/web/vite.config.js +++ b/web/vite.config.js @@ -5,7 +5,8 @@ import tailwindcss from '@tailwindcss/vite' // https://vite.dev/config/ export default defineConfig({ plugins: [ - vue(), - tailwindcss(), + vue(), + tailwindcss( + ), ], })