码迷,mamicode.com
首页 > 其他好文 > 详细

ng-repeat动态生成的DOM如何获取宽度(封装好的方法)

时间:2017-08-24 15:04:26      阅读:241      评论:0      收藏:0      [点我收藏+]

标签:ons   宽度   custom   方法   width   bootstra   如何获取   amp   使用方法   

define([‘custom/bootstrapApp‘],function(app){
app.filter(‘getTabWidth‘,function(){
return function(arg,index,arr,widFn){
if(index&&arr){
if(index==(arr.length-1)){
console.log(‘表格宽度获取成功‘);
widFn&&widFn();
}
}
return arg;
}
})
})

使用方法:
<tr ng-repeat="x in data track by $index">
<td width="100"><span ng-bind="(x | getTabWidth:$index:data:getTabWidth).dataDate">日期</span></td>
</tr>

ng-repeat动态生成的DOM如何获取宽度(封装好的方法)

标签:ons   宽度   custom   方法   width   bootstra   如何获取   amp   使用方法   

原文地址:http://www.cnblogs.com/clj2017/p/7422795.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!