duitang / waterfall Goto Github PK
View Code? Open in Web Editor NEWDuitang Waterfall Woo. (堆糖瀑布流)
License: MIT License
Duitang Waterfall Woo. (堆糖瀑布流)
License: MIT License
We only need the height and width to place an image, so we might not need to wait the hole image be loaded.
Or, it had been achieved?
如何在不刷新页面重建不瀑流, 应要修改源码吧, 重置哪些变量,或者重新绑定哪些事件? 谢谢。
当翻页到第2页的时候,如果第2页只有一张图片的时候页脚隐藏
使用waterfall时碰到一些疑问,各位大牛有空的话希望能帮忙解答一下^_^
从数据库读数据转换成json显示到页面,我做了以下几个改动
1,DEBUG_DATA = ['{"data":{"blogs":${json}....
将blogs后面的数据换为json
2,将masnunit.js中的TEMPLATES进行了改动,以符合我的json数据格式
3,将页面中多余的form这些删掉
现在碰到的问题是
1,页面往下拉的时候,数据不能加载出来,加载之后就显示分页的div了,下一页的内容显示不出来
2,往下滚动的时候 去调用的哪个方法将数据填充到下面的呢
如果从数据动态读数据 有示例吗?
麻烦了~
如何组成endless 的分页,滚动到底部自动加载, 我尝试改大'subpagenum': 20, 结果一页就记载了好多东西, 我想要一屏少点东西, 需要的时候再多加载些。现在改大后一开始就加载过多的东西。 有什么配置能实现好一点的滚动分页呢?
exrecycle 设置为 true 将开启自动回收功能,见 http://www.duitang.com/app/woo/examples/recycledemo1.html
注意:如果 exrecycle 开启,则 resize 功能将停止工作。
the demo links in README are no longer available now :(
any chance to update it?
你好,请问能否实现如果一次性抓取所有数据,再分多个子页展示?
就是第一次请求回来的json就已经包含所有的数据了。
请问是否有图片延时加载功能,如何设置相关参数?
在ANALYZERESPONSE新建了一个组装方式,自定义了单元样式(复制第二种)。
code如下
function (h){
var strrt = _strReturn(h);
if( strrt ){
return strrt;
}
var ret = [[],true];
// 转json对象
try{
var jsn = $.isPlainObject(h) ? h : $.parseJSON(h)
}catch(e){
console.log(e)
// 如果parse 失败,直接返回初始状态的 ret;
return ret;
}
// 判断jsn 请求是否成功返回数据
if(jsn.success){
var $rt = $(null),
dat = jsn.data;
for(var i=0,d=dat.theme,l=d.length; i<l; i++){
var unt = [
'<div class="woo col-xs-4 col-md-4 zt-container" >'
+'<div ><img class="featurette-image img-responsive" src="data:image/png;base64," data-src="holder.js/500x500/auto" alt="Generic placeholder image"></div>'
+'<div class="carousel-caption zt-title"><h1>专题名称</h1><p>专题解说</p></div>'
+'<div class="zt-detail"><p>共有<span>116</span>篇文章,8分钟前更新</p></div>'
+'</div>'
].join('')
$rt = $rt.add($(unt))
}
ret = [$rt.toArray(),dat.has_next]
}
return ret;
}
但是当在页面显示出来时,会比我自定义的单元框多了少少样式代码,导致与页面样式很看。如何更好的自定义自己的单元样式呢?
我现在后台只传了图片url过来,前端写死每个图片的宽度,高度根据图片情况自适应。
现在有一个问题就是图片还没加载完成的时候,页面已经渲染了div的宽高,等到图片加载完,布局已经没法改变了,出现图片重叠的情况。
问:有没有办法不传高度宽度情况下解决这个问题?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.