因为以下原因,您没有权限编辑本页:
您可以查看和复制此页面的源代码。
-- Module:NavplateSMWRow
local p = {}
local mw = require('mw')
local frame = mw.getCurrentFrame()
-- 缓存查询结果
local cache = {}
function p.navplateSmwRow(frame)
local category = frame.args[1]
local property = frame.args[2]
local text = frame.args['text'] or category
local icon = frame.args['icon']
-- 使用缓存结果,减少查询
local cacheKey = category .. (property or '') .. (text or '')
if cache[cacheKey] then
return cache[cacheKey]
end
000
1:0
本页使用的模板: