From 5b5ed67e642b207c32d8105fb3b590afff54cf66 Mon Sep 17 00:00:00 2001 From: Guarp Date: Sat, 15 Feb 2025 13:04:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95-02151304?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Examples_box.vue | 167 +++++++++++++++++++++++++ src/components/NavBar.vue | 1 + src/components/Projects_projectBox.vue | 11 +- src/pages/Examples_home.vue | 139 ++++++++++++++++++++ src/router/index.js | 5 + 5 files changed, 320 insertions(+), 3 deletions(-) create mode 100644 src/components/Examples_box.vue create mode 100644 src/pages/Examples_home.vue diff --git a/src/components/Examples_box.vue b/src/components/Examples_box.vue new file mode 100644 index 0000000..8cba6e0 --- /dev/null +++ b/src/components/Examples_box.vue @@ -0,0 +1,167 @@ + + + + + \ No newline at end of file diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 7cf5071..d69343a 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -53,6 +53,7 @@ const navItems = [ 'divider', {name: '博客', link: '/blog'}, {name: '项目', link: '/projects'}, + {name: '实例', link: '/examples'}, {name: '小工具', link: '/tools'}, 'divider', {name: '关于', link: '/about'} diff --git a/src/components/Projects_projectBox.vue b/src/components/Projects_projectBox.vue index ffc3e54..41e33e1 100644 --- a/src/components/Projects_projectBox.vue +++ b/src/components/Projects_projectBox.vue @@ -44,20 +44,25 @@ const getStatusColor = (status) => { border-radius: 12px; overflow: hidden; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* 更强的阴影效果 */ - transition: transform 0.1s ease; + transition: transform 0.2s ease; cursor: pointer; } .project-box:hover { - transform: scale(1.01); /* 鼠标悬停时放大盒子 */ + transform: scale(1.05); /* 鼠标悬停时放大盒子 */ } .project-image { width: 100%; - height: 150px; /* 增加图片高度 */ + height: 150px; + transition: all 0.3s ease; object-fit: cover; } +.project-box:hover .project-image { + transform: scale(1.1); /* 鼠标悬停时放大盒子 */ +} + .project-details { padding: 10px 15px 15px; display: flex; diff --git a/src/pages/Examples_home.vue b/src/pages/Examples_home.vue new file mode 100644 index 0000000..f650e0d --- /dev/null +++ b/src/pages/Examples_home.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/router/index.js b/src/router/index.js index eaac92e..0de052f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -12,6 +12,7 @@ import Account_draft from "../pages/accountPages/Account_draft.vue"; import Account_userInfo from "../pages/accountPages/Account_userInfo.vue"; import Account_admin_uploadLog from "../pages/accountPages/Account_admin_uploadLog.vue"; import Projects from "../pages/Projects_home.vue"; +import Examples_home from "../pages/Examples_home.vue"; import Tools_home from "../pages/Tools_home.vue"; import About from "../pages/About.vue"; @@ -32,6 +33,10 @@ const routes = [ path: '/projects', name: 'Projects', component: Projects + }, { + path: '/examples', + name: 'Examples', + component: Examples_home }, { path: '/tools', name: 'Tools',