模块:Test:修订间差异

跳到导航 跳到搜索
删除236字节 、​ 2022年2月1日 (星期二)
无编辑摘要
无编辑摘要
无编辑摘要
第161行: 第161行:
     local tab_count = 0
     local tab_count = 0
     local current_item_count = 0
     local current_item_count = 0
     local current_max_item = params["item_per_tab"]
     local current_max_item = tonumber(params["item_per_tab"])
     local tabs_row_ids = {}
     local tabs_row_ids = {}
     for i, a in ipairs(tot_row_ids) do
     for i, a in ipairs(tot_row_ids) do
第168行: 第168行:
             tab_count = tab_count + 1
             tab_count = tab_count + 1
             if args["item_in_tab"..tostring(tab_count)] then
             if args["item_in_tab"..tostring(tab_count)] then
                 current_max_item = args["item_in_tab"..tostring(tab_count)]
                 current_max_item = tonumber(args["item_in_tab"..tostring(tab_count)])
             else
             else
                 current_max_item = params["item_per_tab"]
                 current_max_item = tonumber(params["item_per_tab"])
             end
             end
             tabs_row_ids[tab_count] = {}
             tabs_row_ids[tab_count] = {}
第216行: 第216行:
             ele_title:wikitext(args[params['tab_prefix']..tostring(i)])
             ele_title:wikitext(args[params['tab_prefix']..tostring(i)])
         else  
         else  
             if args["item_in_tab"..tostring(tab_count)] then
             ele_title:wikitext(tostring(current_count).."~"..tostring(current_count+tableLength(row_ids)-1))
                ele_title:wikitext(tostring(current_count).."~"..tostring(current_count+tableLength(row_ids)-1))
            else
                local item_per_tab = tonumber(params["item_per_tab"])
                ele_title:wikitext(tostring((i-1)*item_per_tab+1).."~"..tostring(i*item_per_tab))
            end
         end
         end
         current_count = current_count + tableLength(row_ids)
         current_count = current_count + tableLength(row_ids)

导航菜单