模块:Test:修订间差异

跳到导航 跳到搜索
删除11字节 、​ 2022年1月31日 (星期一)
无编辑摘要
无编辑摘要
无编辑摘要
第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, id in ipairs(tot_row_ids) do
 
         if i % item_per_tab == 1 then
     for i=1,tab_count do
             tabs_row_ids[i / item_per_tab + 1] = {}
         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
        table.insert(tabs_row_ids[i / item_per_tab + 1], id)
     end
     end


     -- if only one table is needed...
     -- if only one table is needed...
    local tab_count = tableLength(tabs_row_ids)
     if tab_count == 1 then
     if tab_count == 1 then
         return renderTable(args, next(tabs_row_ids))
         return renderTable(args, next(tabs_row_ids))

导航菜单