Authored by 杨延青

Merge branch 'feature/0330' into 'release/6.8.8'

fix lottie



See merge request !26
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 {{slideIndex}}<span>/</span>{{data.blockList.length}} 18 {{slideIndex}}<span>/</span>{{data.blockList.length}}
19 </div> 19 </div>
20 </div> 20 </div>
21 - <div class="praise-lottie"> 21 + <div v-show="onAnimation" class="praise-lottie">
22 <WidgetLottie ref="lottie" :options="lottieOptions"></WidgetLottie> 22 <WidgetLottie ref="lottie" :options="lottieOptions"></WidgetLottie>
23 </div> 23 </div>
24 </div> 24 </div>
@@ -58,7 +58,8 @@ export default { @@ -58,7 +58,8 @@ export default {
58 }, 58 },
59 lottieOptions: { 59 lottieOptions: {
60 animationData: lottieJson 60 animationData: lottieJson
61 - } 61 + },
  62 + onAnimation: false
62 }; 63 };
63 }, 64 },
64 computed: { 65 computed: {
@@ -126,10 +127,12 @@ export default { @@ -126,10 +127,12 @@ export default {
126 }, 127 },
127 praiseArticle(e) { 128 praiseArticle(e) {
128 if (e.timeStamp - this._preTimeStamp < dblclickDdelay) { 129 if (e.timeStamp - this._preTimeStamp < dblclickDdelay) {
  130 + this.onAnimation = true;
129 this._lottieTimer && clearTimeout(this._lottieTimer); 131 this._lottieTimer && clearTimeout(this._lottieTimer);
130 this.$refs.lottie.play(); 132 this.$refs.lottie.play();
131 this._lottieTimer = setTimeout(() => { 133 this._lottieTimer = setTimeout(() => {
132 this.$refs.lottie.stop(); 134 this.$refs.lottie.stop();
  135 + this.onAnimation = false;
133 }, 1000); 136 }, 1000);
134 this.$emit('on-praise'); 137 this.$emit('on-praise');
135 } 138 }