From 4c50a23279fe3b33435ac8ee8bb3b23c6d546367 Mon Sep 17 00:00:00 2001 From: Zheng Jie <201507802@qq.com> Date: Wed, 24 Aug 2022 13:38:22 +0800 Subject: [PATCH] test --- .env.development | 2 +- src/assets/styles/sidebar.scss | 32 +++++++++++++++++++++++++++++-- src/components/Ad/index.vue | 8 +------- src/layout/components/AppMain.vue | 16 ---------------- src/layout/index.vue | 7 ++++++- 5 files changed, 38 insertions(+), 27 deletions(-) diff --git a/.env.development b/.env.development index a6a4424..fbe1507 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ ENV = 'development' # 接口地址 -VUE_APP_BASE_API = 'https://el-admin.vip' +VUE_APP_BASE_API = 'https://eladmin.vip' VUE_APP_WS_API = 'ws://localhost:8000' # 是否启用 babel-plugin-dynamic-import-node插件 diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 17381fc..9fdf240 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -11,7 +11,7 @@ transition: width 0.28s; width: $sideBarWidth !important; background-color: $menuBg; - height: 100%; + height: 70%; position: fixed; font-size: 0; top: 0; @@ -90,6 +90,9 @@ .sidebar-container { width: 54px !important; } + .sidebar-container-ad { + width: 54px !important; + } .main-container { margin-left: 54px; @@ -154,21 +157,33 @@ width: $sideBarWidth !important; } + .sidebar-container-ad { + transition: transform .28s; + width: $sideBarWidth !important; + } + &.hideSidebar { .sidebar-container { pointer-events: none; transition-duration: 0.3s; transform: translate3d(-$sideBarWidth, 0, 0); } + .sidebar-container-ad { + pointer-events: none; + transition-duration: 0.3s; + transform: translate3d(-$sideBarWidth, 0, 0); + } } } .withoutAnimation { - .main-container, .sidebar-container { transition: none; } + .sidebar-container-ad { + transition: none; + } } } @@ -207,3 +222,16 @@ } } } + +.sidebar-container-ad { + transition: width 0.28s; + width: $sideBarWidth !important; + background-color: $menuBg; + height: 30%; + position: fixed; + font-size: 0; + bottom: 0; + left: 0; + z-index: 999; + overflow: hidden; +} diff --git a/src/components/Ad/index.vue b/src/components/Ad/index.vue index e431e52..18baeea 100644 --- a/src/components/Ad/index.vue +++ b/src/components/Ad/index.vue @@ -4,7 +4,7 @@ id="ww-container" class="wwads-cn wwads-vertical" data-id="148" - style="z-index:10000;position:fixed;bottom:33px;right:1px;max-width:200px;padding: 12px 10px;border-radius:5px;" + style="z-index:10000;padding: 12px 10px;" /> @@ -22,9 +22,3 @@ export default { } } - - diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index f22186f..ac6db2a 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -23,22 +23,6 @@ export default { key() { return this.$route.path } - // watch: { - // '$route.path': { - // handler: function() { - // // define ads element - // const ads = document.getElementById('ww-container') - // // ad parent node - // const prn = ads.parentNode - // // lets clone ads block - // const cln = ads.cloneNode(true) - // // remove the current ads block completely - // prn.removeChild(ads) - // // append a newly cloned one - // prn.appendChild(cln) - // } - // } - // } } } diff --git a/src/layout/index.vue b/src/layout/index.vue index df40e4d..3bacd27 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -2,6 +2,9 @@
+
@@ -19,6 +22,7 @@