diff --git a/pages_promotion/merch/detail.vue b/pages_promotion/merch/detail.vue index a263376..54dd0c9 100644 --- a/pages_promotion/merch/detail.vue +++ b/pages_promotion/merch/detail.vue @@ -322,20 +322,20 @@ export default { return { headerHeight: 320, screenWidth: uni.getSystemInfoSync().windowWidth, - headerHeightInited: false + headerHeightInited: false, + changeStyleDebounce: null }; }, mixins: [list], watch: { - merch: { + 'merch.desc': { handler() { if (!this.headerHeightInited) { this.$nextTick(() => { this.initHeaderHeight(); }); } - }, - deep: true + } } }, methods: { @@ -358,6 +358,13 @@ export default { } }).exec(); }, 100); + }, + changeListStyle() { + if (this.changeStyleDebounce) clearTimeout(this.changeStyleDebounce); + this.changeStyleDebounce = setTimeout(() => { + this.isList = !this.isList; + this.waterfallflow(0); + }, 50); } }, mounted() { @@ -370,8 +377,8 @@ export default { @import './public/css/list.scss';