From 2d328234a11372084081ba766118f465629a7bda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Sun, 5 Mar 2023 20:30:44 +0800 Subject: [PATCH] =?UTF-8?q?faet:=20=E6=B7=BB=E5=8A=A0bbs=20vue3=E5=89=8D?= =?UTF-8?q?=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Yi.BBS.Vue3/package-lock.json | 13 ++- Yi.BBS.Vue3/package.json | 1 + Yi.BBS.Vue3/src/assets/base.css | 74 ------------- Yi.BBS.Vue3/src/assets/main.css | 5 +- Yi.BBS.Vue3/src/components/DisscussCard.vue | 88 +++++++++++++++ Yi.BBS.Vue3/src/components/InfoCard.vue | 55 +++++++++ Yi.BBS.Vue3/src/components/PlateCard.vue | 48 ++++++++ Yi.BBS.Vue3/src/components/WelcomeItem.vue | 85 -------------- Yi.BBS.Vue3/src/layout/AppBody.vue | 7 +- Yi.BBS.Vue3/src/layout/AppHeader.vue | 50 +++++++-- Yi.BBS.Vue3/src/layout/Index.vue | 2 + Yi.BBS.Vue3/src/main.js | 6 +- Yi.BBS.Vue3/src/router/index.js | 10 ++ Yi.BBS.Vue3/src/views/Article.vue | 108 ++++++++++++++++++ Yi.BBS.Vue3/src/views/Discuss.vue | 117 ++++++++++++++++++++ Yi.BBS.Vue3/src/views/Index.vue | 100 ++++++++++++----- 16 files changed, 556 insertions(+), 213 deletions(-) create mode 100644 Yi.BBS.Vue3/src/components/DisscussCard.vue create mode 100644 Yi.BBS.Vue3/src/components/InfoCard.vue create mode 100644 Yi.BBS.Vue3/src/components/PlateCard.vue delete mode 100644 Yi.BBS.Vue3/src/components/WelcomeItem.vue create mode 100644 Yi.BBS.Vue3/src/views/Article.vue create mode 100644 Yi.BBS.Vue3/src/views/Discuss.vue diff --git a/Yi.BBS.Vue3/package-lock.json b/Yi.BBS.Vue3/package-lock.json index 166e23f7..9ca20b19 100644 --- a/Yi.BBS.Vue3/package-lock.json +++ b/Yi.BBS.Vue3/package-lock.json @@ -8,6 +8,7 @@ "name": "yi-bbs", "version": "0.0.0", "dependencies": { + "@element-plus/icons-vue": "^2.1.0", "axios": "^1.3.4", "element-plus": "^2.2.32", "pinia": "^2.0.32", @@ -390,9 +391,9 @@ } }, "node_modules/@element-plus/icons-vue": { - "version": "2.0.10", - "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz", - "integrity": "sha512-ygEZ1mwPjcPo/OulhzLE7mtDrQBWI8vZzEWSNB2W/RNCRjoQGwbaK4N8lV4rid7Ts4qvySU3njMN7YCiSlSaTQ==", + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.1.0.tgz", + "integrity": "sha512-PSBn3elNoanENc1vnCfh+3WA9fimRC7n+fWkf3rE5jvv+aBohNHABC/KAR5KWPecxWxDTVT1ERpRbOMRcOV/vA==", "peerDependencies": { "vue": "^3.2.0" } @@ -3218,9 +3219,9 @@ "integrity": "sha512-/Z3l6pXthq0JvMYdUFyX9j0MaCltlIn6mfh9jLyQwg5aPKxkyNa0PTHtU1AlFXLNk55ZuAeJRcpvq+tmLfKmaQ==" }, "@element-plus/icons-vue": { - "version": "2.0.10", - "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.0.10.tgz", - "integrity": "sha512-ygEZ1mwPjcPo/OulhzLE7mtDrQBWI8vZzEWSNB2W/RNCRjoQGwbaK4N8lV4rid7Ts4qvySU3njMN7YCiSlSaTQ==", + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.1.0.tgz", + "integrity": "sha512-PSBn3elNoanENc1vnCfh+3WA9fimRC7n+fWkf3rE5jvv+aBohNHABC/KAR5KWPecxWxDTVT1ERpRbOMRcOV/vA==", "requires": {} }, "@esbuild/android-arm": { diff --git a/Yi.BBS.Vue3/package.json b/Yi.BBS.Vue3/package.json index 217dcfa2..34ef6cb8 100644 --- a/Yi.BBS.Vue3/package.json +++ b/Yi.BBS.Vue3/package.json @@ -8,6 +8,7 @@ "preview": "vite preview" }, "dependencies": { + "@element-plus/icons-vue": "^2.1.0", "axios": "^1.3.4", "element-plus": "^2.2.32", "pinia": "^2.0.32", diff --git a/Yi.BBS.Vue3/src/assets/base.css b/Yi.BBS.Vue3/src/assets/base.css index 71dc55a3..e69de29b 100644 --- a/Yi.BBS.Vue3/src/assets/base.css +++ b/Yi.BBS.Vue3/src/assets/base.css @@ -1,74 +0,0 @@ -/* color palette from */ -:root { - --vt-c-white: #ffffff; - --vt-c-white-soft: #f8f8f8; - --vt-c-white-mute: #f2f2f2; - - --vt-c-black: #181818; - --vt-c-black-soft: #222222; - --vt-c-black-mute: #282828; - - --vt-c-indigo: #2c3e50; - - --vt-c-divider-light-1: rgba(60, 60, 60, 0.29); - --vt-c-divider-light-2: rgba(60, 60, 60, 0.12); - --vt-c-divider-dark-1: rgba(84, 84, 84, 0.65); - --vt-c-divider-dark-2: rgba(84, 84, 84, 0.48); - - --vt-c-text-light-1: var(--vt-c-indigo); - --vt-c-text-light-2: rgba(60, 60, 60, 0.66); - --vt-c-text-dark-1: var(--vt-c-white); - --vt-c-text-dark-2: rgba(235, 235, 235, 0.64); -} - -/* semantic color variables for this project */ -:root { - --color-background: var(--vt-c-white); - --color-background-soft: var(--vt-c-white-soft); - --color-background-mute: var(--vt-c-white-mute); - - --color-border: var(--vt-c-divider-light-2); - --color-border-hover: var(--vt-c-divider-light-1); - - --color-heading: var(--vt-c-text-light-1); - --color-text: var(--vt-c-text-light-1); - - --section-gap: 160px; -} - -@media (prefers-color-scheme: dark) { - :root { - --color-background: var(--vt-c-black); - --color-background-soft: var(--vt-c-black-soft); - --color-background-mute: var(--vt-c-black-mute); - - --color-border: var(--vt-c-divider-dark-2); - --color-border-hover: var(--vt-c-divider-dark-1); - - --color-heading: var(--vt-c-text-dark-1); - --color-text: var(--vt-c-text-dark-2); - } -} - -*, -*::before, -*::after { - box-sizing: border-box; - margin: 0; - position: relative; - font-weight: normal; -} - -body { - min-height: 100vh; - color: var(--color-text); - background: var(--color-background); - transition: color 0.5s, background-color 0.5s; - line-height: 1.6; - font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, - Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; - font-size: 15px; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} diff --git a/Yi.BBS.Vue3/src/assets/main.css b/Yi.BBS.Vue3/src/assets/main.css index 637bd1c5..16bb7aaf 100644 --- a/Yi.BBS.Vue3/src/assets/main.css +++ b/Yi.BBS.Vue3/src/assets/main.css @@ -3,12 +3,15 @@ margin: 0 auto; font-weight: normal; } */ + body { margin: 0 auto; font-weight: normal; - } +a{ + text-decoration: none; + } /* #app { max-width: 1280px; diff --git a/Yi.BBS.Vue3/src/components/DisscussCard.vue b/Yi.BBS.Vue3/src/components/DisscussCard.vue new file mode 100644 index 00000000..c932bb10 --- /dev/null +++ b/Yi.BBS.Vue3/src/components/DisscussCard.vue @@ -0,0 +1,88 @@ + + + \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/components/InfoCard.vue b/Yi.BBS.Vue3/src/components/InfoCard.vue new file mode 100644 index 00000000..c3508772 --- /dev/null +++ b/Yi.BBS.Vue3/src/components/InfoCard.vue @@ -0,0 +1,55 @@ + + + + + \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/components/PlateCard.vue b/Yi.BBS.Vue3/src/components/PlateCard.vue new file mode 100644 index 00000000..85b19435 --- /dev/null +++ b/Yi.BBS.Vue3/src/components/PlateCard.vue @@ -0,0 +1,48 @@ + + + + + \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/components/WelcomeItem.vue b/Yi.BBS.Vue3/src/components/WelcomeItem.vue deleted file mode 100644 index a5eca70f..00000000 --- a/Yi.BBS.Vue3/src/components/WelcomeItem.vue +++ /dev/null @@ -1,85 +0,0 @@ - - - diff --git a/Yi.BBS.Vue3/src/layout/AppBody.vue b/Yi.BBS.Vue3/src/layout/AppBody.vue index 1c26cdc8..245c4c82 100644 --- a/Yi.BBS.Vue3/src/layout/AppBody.vue +++ b/Yi.BBS.Vue3/src/layout/AppBody.vue @@ -1,13 +1,10 @@ \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/layout/AppHeader.vue b/Yi.BBS.Vue3/src/layout/AppHeader.vue index e832d3ce..5adcfbe3 100644 --- a/Yi.BBS.Vue3/src/layout/AppHeader.vue +++ b/Yi.BBS.Vue3/src/layout/AppHeader.vue @@ -4,29 +4,57 @@ class="el-menu-demo" mode="horizontal" @select="handleSelect" + > - Processing Center + + 主页 - + item one item two item three - - - item one - item two - item three - - Info - Orders + + + item one + item two + item three + + + + item one + item two + item three + + +
+ + 搜索 + 学习 + + + item one + item two + item three + \ No newline at end of file + + \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/layout/Index.vue b/Yi.BBS.Vue3/src/layout/Index.vue index 2ab328cd..32d00a21 100644 --- a/Yi.BBS.Vue3/src/layout/Index.vue +++ b/Yi.BBS.Vue3/src/layout/Index.vue @@ -21,5 +21,7 @@ import AppBody from "./AppBody.vue" .el-main{ margin: 0; padding: 0; +min-height: 10rem; +background-color: #F0F2F5; } \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/main.js b/Yi.BBS.Vue3/src/main.js index 4fb24b7e..83bb2f63 100644 --- a/Yi.BBS.Vue3/src/main.js +++ b/Yi.BBS.Vue3/src/main.js @@ -5,9 +5,11 @@ import App from './App.vue' import router from './router' import './assets/main.css' - +import * as ElementPlusIconsVue from '@element-plus/icons-vue' const app = createApp(App) - +for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) + } app.use(createPinia()) app.use(router) diff --git a/Yi.BBS.Vue3/src/router/index.js b/Yi.BBS.Vue3/src/router/index.js index acd17c7a..472c7771 100644 --- a/Yi.BBS.Vue3/src/router/index.js +++ b/Yi.BBS.Vue3/src/router/index.js @@ -15,6 +15,16 @@ const router = createRouter({ path: '/index', component: () => import('../views/Index.vue') }, + { + name:'article', + path: '/article', + component: () => import('../views/Article.vue') + }, + { + name:'discuss', + path: '/discuss', + component: () => import('../views/Discuss.vue') + }, ] }, { path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound }, diff --git a/Yi.BBS.Vue3/src/views/Article.vue b/Yi.BBS.Vue3/src/views/Article.vue new file mode 100644 index 00000000..1eb9cd21 --- /dev/null +++ b/Yi.BBS.Vue3/src/views/Article.vue @@ -0,0 +1,108 @@ + + + diff --git a/Yi.BBS.Vue3/src/views/Discuss.vue b/Yi.BBS.Vue3/src/views/Discuss.vue new file mode 100644 index 00000000..503771af --- /dev/null +++ b/Yi.BBS.Vue3/src/views/Discuss.vue @@ -0,0 +1,117 @@ + + + \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/views/Index.vue b/Yi.BBS.Vue3/src/views/Index.vue index ea5e1c0b..8bfdd7ec 100644 --- a/Yi.BBS.Vue3/src/views/Index.vue +++ b/Yi.BBS.Vue3/src/views/Index.vue @@ -1,57 +1,91 @@ +