From 7769c4bb438bc0fda74b31b9c9f974c832409f9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?=
<188633308@qq.com>
Date: Thu, 3 Jun 2021 17:53:25 +0800
Subject: [PATCH] =?UTF-8?q?update=20=E6=9B=B4=E6=8D=A2=E5=A4=96=E6=A1=86?=
=?UTF-8?q?=E6=9E=B6=E5=B8=83=E5=B1=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Web/src/assets/style/main.less | 202 ++++++++-------
Web/src/main.js | 5 +
.../views/main-dynamic/_layout/content.vue | 166 ++++++++++++
.../main-dynamic/_layout/header/index.vue | 100 ++++++++
.../main-dynamic/_layout/header/search.js | 149 +++++++++++
.../views/main-dynamic/_layout/header/user.js | 91 +++++++
Web/src/views/main-dynamic/_layout/logo.vue | 10 +
.../_layout/nav/index.js | 0
.../main-dynamic/_layout/sider/index.vue | 116 +++++++++
.../views/main-dynamic/_layout/sider/menu.js | 92 +++++++
Web/src/views/main-dynamic/index.vue | 239 ++++++++++++++++++
.../views/{main => main-dynamic}/setting.vue | 0
Web/src/views/main/_layout/header/index.vue | 52 +---
Web/src/views/main/_layout/sider/index.vue | 47 ++--
Web/src/views/main/_layout/sider/menu.js | 2 +-
Web/src/views/main/index.vue | 12 +-
16 files changed, 1102 insertions(+), 181 deletions(-)
create mode 100644 Web/src/views/main-dynamic/_layout/content.vue
create mode 100644 Web/src/views/main-dynamic/_layout/header/index.vue
create mode 100644 Web/src/views/main-dynamic/_layout/header/search.js
create mode 100644 Web/src/views/main-dynamic/_layout/header/user.js
create mode 100644 Web/src/views/main-dynamic/_layout/logo.vue
rename Web/src/views/{main => main-dynamic}/_layout/nav/index.js (100%)
create mode 100644 Web/src/views/main-dynamic/_layout/sider/index.vue
create mode 100644 Web/src/views/main-dynamic/_layout/sider/menu.js
create mode 100644 Web/src/views/main-dynamic/index.vue
rename Web/src/views/{main => main-dynamic}/setting.vue (100%)
diff --git a/Web/src/assets/style/main.less b/Web/src/assets/style/main.less
index 3853d6f..7d7dbd6 100644
--- a/Web/src/assets/style/main.less
+++ b/Web/src/assets/style/main.less
@@ -320,6 +320,99 @@
}
}
}
+ .yo-layout-sider {
+ height: 100%;
+
+ background-color: @nav-background;
+ .ant-layout-sider-children {
+ display: flex;
+ flex-direction: column;
+ }
+ .logo {
+ font-size: @font-size-lg * 1.5;
+ font-weight: 500;
+ line-height: @layout-header-height + 10px;
+
+ z-index: 11;
+
+ display: flex;
+ overflow: hidden;
+ align-items: center;
+ flex: 0 0 @layout-header-height + 10px;
+
+ height: @layout-header-height + 10px;
+ padding: 0 @padding-md 0 @padding-lg;
+
+ color: @logo-color;
+ box-shadow: @logo-box-shadow;
+ img {
+ max-height: 100%;
+ }
+ span {
+ margin-left: @padding-sm;
+
+ transition: @animation-duration-slow;
+ transition-property: opacity;
+ }
+ }
+ &.ant-layout-sider-collapsed {
+ .logo {
+ span {
+ opacity: 0;
+ }
+ }
+ }
+ .yo-sider-nav {
+ position: relative;
+ z-index: 10;
+
+ flex: 1 1 100%;
+
+ box-shadow: 2px 0 8px @nav-box-shadow-color;
+ &--app {
+ font-size: @font-size-sm;
+
+ margin-top: @padding-sm;
+ padding: 0 @padding-md;
+
+ color: @nav-app-color;
+ }
+ }
+ .swiper-container {
+ position: absolute;
+ top: 0;
+ left: 0;
+ bottom: 0;
+
+ width: 100%;
+ .swiper-scrollbar {
+ transition: @animation-duration-slow;
+ transition-property: opacity;
+
+ opacity: 0;
+ }
+ .swiper-scrollbar-drag {
+ background-color: @nav-scrollbar-background;
+ }
+ &:hover {
+ .swiper-scrollbar {
+ opacity: 1;
+ }
+ }
+ }
+ .swiper-slide {
+ height: auto;
+ min-height: 100%;
+ >.ant-spin-nested-loading {
+ height: 100%;
+ .ant-spin-blur {
+ &::after {
+ opacity: 0;
+ }
+ }
+ }
+ }
+ }
.yo-layout--left-menu,
.yo-layout--right-menu {
position: absolute;
@@ -366,99 +459,11 @@
}
}
}
+ .layout-sider {
+ }
>section {
>.ant-layout-sider {
- height: 100%;
-
- background-color: @nav-background;
- .ant-layout-sider-children {
- display: flex;
- flex-direction: column;
- }
- .logo {
- font-size: @font-size-lg * 1.5;
- font-weight: 500;
- line-height: @layout-header-height + 10px;
-
- z-index: 11;
-
- display: flex;
- overflow: hidden;
- align-items: center;
- flex: 0 0 @layout-header-height + 10px;
-
- height: @layout-header-height + 10px;
- padding: 0 @padding-md 0 @padding-lg;
-
- color: @logo-color;
- box-shadow: @logo-box-shadow;
- img {
- max-height: 100%;
- }
- span {
- margin-left: @padding-sm;
-
- transition: @animation-duration-slow;
- transition-property: opacity;
- }
- }
- &.ant-layout-sider-collapsed {
- .logo {
- span {
- opacity: 0;
- }
- }
- }
- .yo-sider-nav {
- position: relative;
- z-index: 10;
-
- flex: 1 1 100%;
-
- box-shadow: 2px 0 8px @nav-box-shadow-color;
- &--app {
- font-size: @font-size-sm;
-
- margin-top: @padding-sm;
- padding: 0 @padding-md;
-
- color: @nav-app-color;
- }
- }
- .swiper-container {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
-
- width: 100%;
- .swiper-scrollbar {
- transition: @animation-duration-slow;
- transition-property: opacity;
-
- opacity: 0;
- }
- .swiper-scrollbar-drag {
- background-color: @nav-scrollbar-background;
- }
- &:hover {
- .swiper-scrollbar {
- opacity: 1;
- }
- }
- }
- .swiper-slide {
- height: auto;
- min-height: 100%;
- >.ant-spin-nested-loading {
- height: 100%;
- .ant-spin-blur {
- &::after {
- opacity: 0;
- }
- }
- }
- }
+ .yo-layout-sider();
}
}
}
@@ -473,9 +478,16 @@
width: 100%;
min-width: @container-width;
height: 100%;
+
+ @layout-header-height: 54px;
.ant-layout-header {
+ line-height: @layout-header-height;
+
+ z-index: 11;
+
flex: 0 0 @layout-header-height;
+ height: @layout-header-height;
padding: 0;
background-color: @nav-background;
@@ -515,19 +527,19 @@
}
}
.user-container {
- margin: 12px 0;
+ margin: (@layout-header-height - 40px) / 2 0;
}
.logo {
font-size: @font-size-lg * 1.5;
font-weight: 500;
- line-height: @layout-header-height;
+ line-height: @layout-header-height - 10px;
display: flex;
overflow: hidden;
align-items: center;
- height: @layout-header-height;
- margin-right: @padding-lg;
+ height: @layout-header-height 10px;
+ margin: 5px @padding-lg 5px 0;
color: @logo-color;
img {
diff --git a/Web/src/main.js b/Web/src/main.js
index ab56557..1e13ac4 100644
--- a/Web/src/main.js
+++ b/Web/src/main.js
@@ -100,6 +100,11 @@ import './assets/style/app.less'
import { SETTING_KEY } from './common/storage'
const settings = JSON.parse(window.localStorage.getItem(SETTING_KEY))
+Object.assign(settings, {
+ layout: 'top-nav',
+ container: 'container-fluid',
+ navTheme: 'dark'
+})
const app = new Vue({
data: {
diff --git a/Web/src/views/main-dynamic/_layout/content.vue b/Web/src/views/main-dynamic/_layout/content.vue
new file mode 100644
index 0000000..f049914
--- /dev/null
+++ b/Web/src/views/main-dynamic/_layout/content.vue
@@ -0,0 +1,166 @@
+
+