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