242
个编辑
Willson-v-(讨论 | 贡献) 无编辑摘要 |
Willson-v-(讨论 | 贡献) 无编辑摘要 |
||
第156行: | 第156行: | ||
table.sort(tot_row_ids) | table.sort(tot_row_ids) | ||
local tab_count = (tableLength(tot_row_ids) - 1) / item_per_tab + 1 | |||
local tabs_row_ids = {} | local tabs_row_ids = {} | ||
for i, | |||
for i=1,tab_count do | |||
tabs_row_ids[i | tabs_row_ids[i] = {} | ||
for j=1,item_per_tab do | |||
tabs_row_ids[i][j] = tot_row_ids[(i-1)*item_per_tab + j] | |||
end | end | ||
end | end | ||
-- if only one table is needed... | -- if only one table is needed... | ||
if tab_count == 1 then | if tab_count == 1 then | ||
return renderTable(args, next(tabs_row_ids)) | return renderTable(args, next(tabs_row_ids)) |