Lua错误 第17行:attempt to concatenate local 'title' (a nil value)
local p = {}
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame)
local title
local count = 0
local datas = {}
for k, v in pairs(args) do
if (k == 1) then
title = v
else
count = count + 1
table.insert(datas, 'data-key-' .. tostring(count) .. '="' .. k .. '"')
table.insert(datas, 'data-value-' .. tostring(count) .. '="' .. v .. '"')
end
end
local output = '<div class="TemplateAsyncLoad" data-title="' .. title .. '" ' .. table.concat(datas, ' ') .. '>Loading</div>'
return output
end
return p