From 27812ff11c5a094f1326ca50bafe7006b72a7cb4 Mon Sep 17 00:00:00 2001 From: zyronon Date: Thu, 16 Feb 2023 02:09:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/less/variables.less | 2 +- src/components/Scroll.vue | 2 +- src/components/slide/BVideo.vue | 8 ++-- src/pages/slideHooks/Community.vue | 10 +++-- src/pages/slideHooks/IndicatorHome.vue | 4 +- src/pages/slideHooks/Shop.vue | 62 ++++++++++++++++++++++---- src/pages/slideHooks/index.vue | 19 +++----- 7 files changed, 73 insertions(+), 34 deletions(-) diff --git a/src/assets/less/variables.less b/src/assets/less/variables.less index 20627eb..817db3b 100644 --- a/src/assets/less/variables.less +++ b/src/assets/less/variables.less @@ -1,5 +1,5 @@ @footer-height: 50rem; -@header-height: 60rem; +@header-height: 50rem; @indicator-height: 50rem; @padding-page: 15rem; \ No newline at end of file diff --git a/src/components/Scroll.vue b/src/components/Scroll.vue index bf0a8f9..ff5db84 100644 --- a/src/components/Scroll.vue +++ b/src/components/Scroll.vue @@ -97,7 +97,7 @@ export default { } }, scrollBottom() { - nextTick(()=>{ + nextTick(() => { this.wrapper.scrollTo({top: this.wrapper.scrollHeight - this.wrapper.clientHeight}) }) } diff --git a/src/components/slide/BVideo.vue b/src/components/slide/BVideo.vue index 12a5bf0..71badd9 100644 --- a/src/components/slide/BVideo.vue +++ b/src/components/slide/BVideo.vue @@ -245,11 +245,13 @@ export default { bus.off(EVENT_KEY.CLOSE_SUB_TYPE, this.onCloseSubType) }, methods: { - onOpenSubType({index, height}) { + onOpenSubType({id, height}) { + if (id !== this.item.id) return this.isMarginTop = true Utils.$setCss(this.$refs.video, 'margin-top', `${height}px`) }, - onCloseSubType({index}) { + onCloseSubType({id}) { + if (id !== this.item.id) return this.isMarginTop = false Utils.$setCss(this.$refs.video, 'margin-top', `0px`) }, @@ -370,7 +372,7 @@ export default { width: 100%; height: 100%; transition: height, margin-top .3s; - background: black; + //background: black; /*position: absolute;*/ } diff --git a/src/pages/slideHooks/Community.vue b/src/pages/slideHooks/Community.vue index 986ffde..b5ece0b 100644 --- a/src/pages/slideHooks/Community.vue +++ b/src/pages/slideHooks/Community.vue @@ -70,19 +70,21 @@ onMounted(() => { font-size: 14rem; color: white; padding-top: @header-height; + background: rgb(21, 23, 36); .Scroll { - background: black; - //height: calc(100vh - @header-height) !important; height: calc(100vh - @header-height - @footer-height) !important; } - .goods-list { + @p: 1rem; + .goods-list { + padding: @p; + box-sizing: border-box; } .goods { - width: 50%; + width: calc(50% - @p); padding: 3rem; box-sizing: border-box; diff --git a/src/pages/slideHooks/IndicatorHome.vue b/src/pages/slideHooks/IndicatorHome.vue index 78f6bf5..3f33631 100644 --- a/src/pages/slideHooks/IndicatorHome.vue +++ b/src/pages/slideHooks/IndicatorHome.vue @@ -188,8 +188,6 @@ export default {