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' },