Giter Site home page Giter Site logo

Comments (13)

myronliu347 avatar myronliu347 commented on July 28, 2024 1

你先改成这样再试试

from vue-carbon.

myronliu347 avatar myronliu347 commented on July 28, 2024

loadMore 里的实现给我看看

from vue-carbon.

SidFeng avatar SidFeng commented on July 28, 2024

loadMore () { debugger this.loading = true setTimeout(() => { this.loading = false if (this.end < 100) { for (let i = this.end; i < this.end + 20; i++) { this.list.push(this.list); } } this.end += 20 }, 1000); },

from vue-carbon.

myronliu347 avatar myronliu347 commented on July 28, 2024

infiniteScroll,实在滚动到底部才加载(load事件),没有滚动事件是不会加载的

export default {
  data () {
    return {
      items: ['1', '2', '3', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20'],
      end: 20,
      loading: false
    }
  },
  methods: {
    loadMore () {
      this.loading = true
      setTimeout(() => {
        this.loading = false
        if (this.end < 100) {
          for (let i = this.end; i < this.end + 20; i++) {
            this.items.push(String(i + 1))
          }
        }
        this.end += 20
      }, 1000)
    }
  }
}

from vue-carbon.

myronliu347 avatar myronliu347 commented on July 28, 2024

请问,是否已经解决?

from vue-carbon.

SidFeng avatar SidFeng commented on July 28, 2024

有滚动事件啊

from vue-carbon.

myronliu347 avatar myronliu347 commented on July 28, 2024

能将这个页面代码完整的贴出来看看么

from vue-carbon.

myronliu347 avatar myronliu347 commented on July 28, 2024

现在是滚动到底部,没有触发load事件么?

from vue-carbon.

SidFeng avatar SidFeng commented on July 28, 2024

是的,不会到loadmore里面去

from vue-carbon.

myronliu347 avatar myronliu347 commented on July 28, 2024

这个ui库使用的是flexbox做布局, 每个页面的 顶部都要一个 page 的样式

 <div class="page">
 页面内容
</div>

如果你的版本是 0.4.0

 <div class="vc-page">
 页面内容
</div>

from vue-carbon.

SidFeng avatar SidFeng commented on July 28, 2024

还是不行

from vue-carbon.

myronliu347 avatar myronliu347 commented on July 28, 2024

我看到了你的代码上有两个地方指定了v-el:scroller

<list v-el:scroller >

把这个去掉

from vue-carbon.

SidFeng avatar SidFeng commented on July 28, 2024
<list v-el:scroller >

上面是因为我在尝试是不是这个元素选择出错,我又写了这个。不过,现在解决了,这个问题解决方法就是

 <div class="page">
 页面内容
</div>

from vue-carbon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.