ionic瀑布流
来源:互联网 发布:常用数据库管理系统 编辑:程序博客网 时间:2024/05/29 02:31
首先使用这个插件:
https://github.com/zedwang/angular-waterfall
更改部分代码,获得兼容性
if (scope.$last === true) { angular.element(element).ready(function() { var img = element.find("img")[0]; var oImage = new Image(); if (oImage.complete) { //$timeout.cancel(); //$timeout(function(){ scope.$emit("waterfall:repeatFinished"); //},500); }else { oImage.onload = function () { scope.$emit("waterfall:repeatFinished"); }; } oImage.src = img.src; }); }
$rootScope.$on("waterfall:repeatFinished",function(){ $timeout.cancel(); $timeout(function(){ waterfall(scope.minCols); },500) });
如果不需要点击按钮加载更多功能,则下拉刷新和上拉加载依旧使用ionic指令,不过要注意上拉加载的触发需要在数据变更后加一段时间的延迟
0 0
- ionic瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- 瀑布流
- zoj 2319 Beautiful People 【最长上升序列】
- 详解如何用AD 生成Gerber文件
- Bitmap ---> getRGB565 face检测
- fprintf用法详解
- 编译原理--引论
- ionic瀑布流
- 有关Html中<a>、<link>和<script>标签中相对路径与绝对路径的问题总结
- eclipse launch failed.binary not found
- 蓝桥杯:龟兔赛跑预测
- Qrcode生成二维码链接地址,网页授权获取微信用户信息
- android全屏与非全屏切换时Toolbar的显示,仿微信漂流瓶效果
- Git本地多用户配置
- 关于SpringMVC 的国际化操作
- Automapper使用