“模块:Dict”的版本间的差异
来自希灵百科
第7行: | 第7行: | ||
local DictDate = {} | local DictDate = {} | ||
− | + | local SerilNum = {"A","C","D","F","G","H"} | |
− | + | --local SerilNum = {"A","C"} | |
local res = "" | local res = "" | ||
local N = 0 | local N = 0 | ||
第17行: | 第17行: | ||
for b,list in pairs(dictionary[SN]) do | for b,list in pairs(dictionary[SN]) do | ||
− | res = res .. b .. " [[" .. list .."]]" | + | res = res .. b .. " [[" .. list .."]]<br> " |
− | + | --[[ N = N+1 | |
if N == 5 then | if N == 5 then | ||
res = res .." <br>" | res = res .." <br>" | ||
− | + | end]] | |
− | end | ||
end | end |
2020年5月10日 (日) 01:35的版本
local p = {} local getArgs = require("Module:Arguments").getArgs local dictionary = mw.loadData("Module:Dict/Data") function p.DictIndex(frame) local DictDate = {} local SerilNum = {"A","C","D","F","G","H"} --local SerilNum = {"A","C"} local res = "" local N = 0 for a,SN in pairs(SerilNum) do res = res .. "\n " for b,list in pairs(dictionary[SN]) do res = res .. b .. " [[" .. list .."]]<br> " --[[ N = N+1 if N == 5 then res = res .." <br>" end]] end res = res .." <br>" end return tostring(res) end return p