模块:切换显示:修订间差异

跳到导航 跳到搜索
删除78字节 、​ 2022年5月4日 (星期三)
无编辑摘要
(建立内容为“local module = {} local getArgs = require('Module:Arguments').getArgs local sortedArgs = require('Module:SortArgs').sortedArgs local initSpan = function(class…”的新页面)
 
无编辑摘要
第2行: 第2行:
   
   
local getArgs = require('Module:Arguments').getArgs
local getArgs = require('Module:Arguments').getArgs
local sortedArgs = require('Module:SortArgs').sortedArgs
   
   
local initSpan = function(className, templateName, frame)
local initSpan = function(className, templateName, frame)
local args = getArgs(frame, { wrappers = 'Template:' .. templateName })
local args = getArgs(frame, { wrappers = 'Template:' .. templateName })
    local parent_args = frame:getParent().args;
   
   
local span = mw.html.create('span')
local span = mw.html.create('span')
第20行: 第20行:
}
}
]]
]]
for k, v in sortedArgs(args, frame.args['@sort'], '|') do
for k, v in pairs(args) do
mw.log(k, v)
mw.log(k, v)
if mw.ustring.sub(k, 1, 1) == '@' then
if mw.ustring.sub(k, 1, 1) == '@' then
第84行: 第84行:
local branches = {}
local branches = {}
local params = {}
local params = {}
for k, v in sortedArgs(args, frame.args['@sort'], '|') do
for k, v in args do
if not mw.ustring.match(k, '^@[^@]') then
if not mw.ustring.match(k, '^@[^@]') then
local i = 1
local i = 1

导航菜单