We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
##无限下拉或是上拉组件
<script src="http://www.bootcss.com/p/underscore/underscore-min.js"></script>
;(function() { infiniteLoad({ scollDirection: 'up', //滚动方向,‘up’||‘down’ domString: '', //页尾栏 选择器,可以省略 fatherString: '.content', //父亲元素 选择器 childString: 'li', //标签名字 template: '<p><%= date %></p><p><%= desc %></p><img src=<%= pic %> >', //模版字符underscore写法 cb: async function({ limit, offset }) { let res = await axios.get('/json', { params: { limit, offset } }) let { code, data } = res.data if (parseInt(code, 10) !== 0) return let mockData = Array.apply(null, { length: 50 }).map((item, index) => { return data[index % 2] }) return mockData }, //页尾部栏可见时候,远程加载数据的函数,返回一个promise 数据是对象数组[{}] options: { //一开始的limit和offset限制 limit: 2, offset: 0 } }) })()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
##无限下拉或是上拉组件
依赖:
The text was updated successfully, but these errors were encountered: