From 12fbc3ef97812628fc21de98e901a1f9596d652f Mon Sep 17 00:00:00 2001 From: sundongyu <2811054731@qq.com> Date: Mon, 22 Apr 2024 15:15:28 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=E5=AE=8C=E6=88=90=E4=BA=86lay?= =?UTF-8?q?out=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- env.d.ts | 5 ++ src/App.vue | 85 ++---------------------- src/layout/components/AsideIndex.vue | 92 ++++++++++++++++++++++++++ src/layout/components/ContentIndex.vue | 14 ++++ src/layout/components/HeaderIndex.vue | 36 ++++++++++ src/layout/index.vue | 23 ++++++- src/papes/ShiYan.vue | 7 ++ src/router/index.ts | 19 +++--- src/style/index.css | 2 +- src/style/index.less | 38 +++++------ src/style/variables.less | 2 +- 11 files changed, 208 insertions(+), 115 deletions(-) create mode 100644 src/layout/components/AsideIndex.vue create mode 100644 src/layout/components/ContentIndex.vue create mode 100644 src/layout/components/HeaderIndex.vue create mode 100644 src/papes/ShiYan.vue diff --git a/env.d.ts b/env.d.ts index 11f02fe..95ee9df 100644 --- a/env.d.ts +++ b/env.d.ts @@ -1 +1,6 @@ /// +declare module '*.vue' { + import { DefineComponent } from 'vue' + const component: DefineComponent<{}, {}, any> + export default component +} diff --git a/src/App.vue b/src/App.vue index 7905b05..534db52 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,85 +1,8 @@ - - + - + diff --git a/src/layout/components/AsideIndex.vue b/src/layout/components/AsideIndex.vue new file mode 100644 index 0000000..247506b --- /dev/null +++ b/src/layout/components/AsideIndex.vue @@ -0,0 +1,92 @@ + + + + + diff --git a/src/layout/components/ContentIndex.vue b/src/layout/components/ContentIndex.vue new file mode 100644 index 0000000..3f605ab --- /dev/null +++ b/src/layout/components/ContentIndex.vue @@ -0,0 +1,14 @@ + + + + + diff --git a/src/layout/components/HeaderIndex.vue b/src/layout/components/HeaderIndex.vue new file mode 100644 index 0000000..07fed2c --- /dev/null +++ b/src/layout/components/HeaderIndex.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/src/layout/index.vue b/src/layout/index.vue index 45dd24b..b5d18bb 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,10 +1,27 @@ - + - + + + diff --git a/src/router/index.ts b/src/router/index.ts index a49ae50..6cc1dcd 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,5 +1,5 @@ import { createRouter, createWebHistory } from 'vue-router' -import HomeView from '../views/HomeView.vue' +import Layout from '@/layout/index.vue' const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -7,15 +7,14 @@ const router = createRouter({ { path: '/', name: 'home', - component: HomeView - }, - { - path: '/about', - name: 'about', - // route level code-splitting - // this generates a separate chunk (About.[hash].js) for this route - // which is lazy-loaded when the route is visited. - component: () => import('../views/AboutView.vue') + component: Layout, + children: [ + { + path: '/ad', + name: 'ad', + component: () => import('@/papes/ShiYan.vue') + } + ] } ] }) diff --git a/src/style/index.css b/src/style/index.css index 6d6cc16..51fa199 100644 --- a/src/style/index.css +++ b/src/style/index.css @@ -186,7 +186,7 @@ pre { .back-color { background-color: #f5f7fb; padding: 16px 24px; - height: calc(96vh - 64px); + height: calc(91vh - 64px); overflow-y: auto; overflow-x: hidden; } diff --git a/src/style/index.less b/src/style/index.less index 3673e20..8ab6529 100644 --- a/src/style/index.less +++ b/src/style/index.less @@ -4,31 +4,31 @@ // 滚动条外观样式 ::-webkit-scrollbar { - width: 10px; + width: 10px; } ::-webkit-scrollbar-track { - width: 10px; - border-radius: 10px; + width: 10px; + border-radius: 10px; } ::-webkit-scrollbar-thumb { - border-radius: 8px; - box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); - background: @base-scrollbar-color; + border-radius: 8px; + box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); + background: @base-scrollbar-color; } .t-default-menu__inner .t-menu--scroll { - background-image: linear-gradient(#fff, rgba(146, 146, 255, 0.2)); + background-image: linear-gradient(#fff, rgba(146, 146, 255, 0.2)); } // 主体背景颜色以及大小 .back-color { - background-color: #f5f7fb; - padding: 16px 24px; - height: calc(96vh - 64px); - overflow-y: auto; - overflow-x: hidden; + background-color: #f5f7fb; + padding: 16px 24px; + height: calc(91vh - 64px); + overflow-y: auto; + overflow-x: hidden; } // 去除a标签默认样式 @@ -37,24 +37,24 @@ a:link, a:visited, a:hover, a:active { - text-decoration: none; + text-decoration: none; } // 改变文字按钮的颜色 .t-button--variant-text .t-button__text { - color: @base-text-color; + color: @base-text-color; } // 改变文字按钮移入的颜色 .t-button--variant-text .t-button__text:hover { - color: #8799a3; + color: #8799a3; } // 禁用的颜色 - .t-is-disabled .t-button__text{ - color: #d3d3d3 !important; +.t-is-disabled .t-button__text { + color: #d3d3d3 !important; } // 查询框宽度 .form-item-width { - width: 100%; -} \ No newline at end of file + width: 100%; +} diff --git a/src/style/variables.less b/src/style/variables.less index 51be775..8445a14 100644 --- a/src/style/variables.less +++ b/src/style/variables.less @@ -11,4 +11,4 @@ // text按钮的颜色 @base-text-color: #0052d9; // 滚动条的颜色 -@base-scrollbar-color: rgb(229, 229, 229); \ No newline at end of file +@base-scrollbar-color: rgb(229, 229, 229);