查看“模块:Dict”的源代码
←
模块:Dict
跳转至:
导航
,
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于这些用户组的用户使用:
用户
,
管理员
,Editor
您可以查看与复制此页面的源代码。
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 local Table_Begin = '\n{| class="table" <br>' local Table_End = "\n|}" local Table_collapse = " mw-collapsible mw-collapsed" res = res .. Table_Begin for a,SN in pairs(SerilNum) do res = res .."\n|- <br>" res = res .. '\n| style="text-align:center; width: 25% "| ' .. SN .."系列词条 || " .. Table_collapse .."|" for b,list in pairs(dictionary[SN]) do res = res .. b .. " [[" .. list .."]] " N = N+1 if N == 8 then res = res .." <br>" N = 0 end end res = res .." <br>" end res = res .. Table_End return tostring(res) end return p
调试控制台
* 此模块的导出表存于变量“p”中,包括没有保存的变更。 * 在一行的前面加上“=”可以将其作为表达式来计算,或使用print()。 * 在模块代码中使用mw.log()来向控制台发送消息。
该页面使用的模板:
模块:Dict/doc
(
查看源代码
)
返回至
模块:Dict
。
导航菜单
个人工具
创建账户
登录
命名空间
模块
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
讨论版
提问求助区
帮助
帮助
沙盒
编辑教程
创建新条目
工具
链入页面
相关更改
特殊页面
页面信息
返回顶部
评论预览
×