inleft
2022-08-11 af029bdfb645bd2b75fbab687c1a5f45b428d801
src/components/group/articleListScorll.vue
@@ -1,5 +1,5 @@
<template>
   <div>
   <div class="fade">
      <div v-infinite-scroll="loadMore" infinite-scroll-disabled="busy" :infinite-scroll-distance="10">
         <div class="mySecret" v-if="data.length==0">
            <p>空空如也..</p>
@@ -11,7 +11,7 @@
         </div>
         <div v-if="loading && !busy" class="demo-loading-container">
         <div v-if="loading && !busy" class="loading-container">
            <a-spin />
         </div>
      </div>
@@ -68,21 +68,22 @@
            }
         },
         typeId: function(newValue, oldValue) {
            this.busy = true;
            //有条件不刷新
            if (newValue == undefined && oldValue != "") {
               return
            }
            // if (newValue == undefined || oldValue == "") {
            //    return
            // }
            this.busy = true;
            this.$message.info('loading', 0.3);
            this.onChange(1);
         },
      },
      activated() {
         this.busy = false;
         window.addEventListener('scroll', this);
      },
      deactivated() {
         this.busy = true;
         window.removeEventListener('scroll', this);
      },
      methods: {
@@ -136,7 +137,7 @@
   };
</script>
<style>
   .demo-loading-container {
   .loading-container {
      position: absolute;
      bottom: 40px;
      width: 100%;