From e20934acca115d17d7102a4b19e3b371f40fefe0 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Fri, 18 Jul 2025 15:34:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=90=E5=8D=B7=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/style/layout.styl | 3 + pages/SecondPhase/production/ZjInStore.vue | 75 +++++++++++++++++++--- 2 files changed, 68 insertions(+), 10 deletions(-) diff --git a/common/style/layout.styl b/common/style/layout.styl index 7c4ddc2..8cea0e1 100644 --- a/common/style/layout.styl +++ b/common/style/layout.styl @@ -606,4 +606,7 @@ uni-button[disabled]:not([type]) { width: 100%; border-radius: 20rpx; background-color: #fff; +} +.down_icon { + text-align: center; } \ No newline at end of file diff --git a/pages/SecondPhase/production/ZjInStore.vue b/pages/SecondPhase/production/ZjInStore.vue index d2637b3..201b3be 100644 --- a/pages/SecondPhase/production/ZjInStore.vue +++ b/pages/SecondPhase/production/ZjInStore.vue @@ -3,8 +3,8 @@ - - + + 子卷号 @@ -12,14 +12,24 @@ - - - - - - - 直接入库 + + + + + + + + 直接入库 + + + + @@ -82,9 +92,16 @@ arr1: [], dataList: [], disabled: false, - isV: '0' + isV: '0', + isExpanded: false, + contentHeight: 0 }; }, + computed: { + iconType() { + return this.isExpanded ? 'up' : 'down' + } + }, onPageScroll(e) { this.$refs.UT.topData(e.scrollTop) }, @@ -92,6 +109,44 @@ this.title = options.title }, methods: { + toggleContent() { + this.isExpanded = !this.isExpanded + }, + beforeEnter(el) { + el.style.height = '0' + this.$nextTick(() => { + el.style.height = el.scrollHeight + 'px' + }) + }, + enter(el, done) { + const animation = el.animate( + [ + { height: '0', opacity: 0 }, + { height: el.scrollHeight + 'px', opacity: 1 }, + ], + { + duration: 300, + easing: 'ease', + } + ); + animation.onfinish = done + }, + leave(el, done) { + const animation = el.animate( + [ + { height: el.scrollHeight + 'px', opacity: 1 }, + { height: '0', opacity: 0 }, + ], + { + duration: 300, + easing: 'ease', + } + ) + animation.onfinish = () => { + el.style.height = '0' + done() + } + }, isVirtual () { this.isV = this.isV === '0' ? '1' : '0' },