-
本WIKI编辑权限开放,欢迎收藏起来防止迷路,也希望有爱的小伙伴和我们一起编辑哟~ 编辑帮助:目录 • BWIKI反馈留言板
本WIKI编辑权限开放,欢迎收藏起来防止迷路,也希望有爱的小伙伴和我们一起编辑哟~ 编辑帮助:目录 • BWIKI反馈留言板
 
请选择语言:
            
            全站通知:
            
            
        
模块:剧情/导航
                  
                  
                  刷
                  
                     
                               
                               历
                            
                  
                    
                      
                        
                        编
                      
                    
                
            
            
            
            
            
            跳到导航
            跳到搜索
            
            
                
            
            
            
            
        
    此模块的文档可以在模块:剧情/导航/doc创建
local p={}
-- 处理单个关卡字符串
local function parseDisp(prop_str)
	if prop_str == nil or prop_str==''then
		return ''
	end
	local res = ''
	local dsep = mw.ustring.find(prop_str, '#')
	if dsep~=nil then
		local disp_str = mw.ustring.sub(prop_str, dsep+1)
		local link_str = mw.ustring.sub(prop_str, 1, dsep-1)
		res = mw.ustring.format('[[%s|%s]]', link_str, disp_str)
	else
		res = mw.ustring.format('[[%s]]', prop_str)
	end
	return res
end
-- 按照逗号分割
function p.nav(frame)
	local args = (frame == mw.getCurrentFrame() and frame.args) or frame
	local link_str = args[1]
	local res = ''
	local psep = mw.ustring.find(link_str, ',')
	local prop_str = ''
	while psep~=nil do
		prop_str = mw.ustring.sub(link_str, 1, psep-1)
		link_str = mw.ustring.sub(link_str, psep+1)
		psep = mw.ustring.find(link_str, ',')
		res = res..parseDisp(prop_str)..'<br>'
	end
	res = res..parseDisp(link_str)
	mw.log(res)
	return res
end
-- function p.nav(frame)
-- 	-- local args = frame.args
-- 	-- local args = frame
-- 	local args = (frame == mw.getCurrentFrame() and frame.args) or frame
-- 	local prev_str = args[1]
-- 	local next_str = args[2]
-- 	local res = [[<div class="zs-DialogNavBox"><div class="zs-DialogNav">]]
-- 	res = res..parseLink(prev_str)
-- 	res = res..[[</div><div class="zs-DialogNav right">]]
-- 	res = res..parseLink(next_str)
-- 	res = res..[[</div></div>]]
-- 	mw.log(res)
-- 	return res
-- end
return p
                
                    沪公网安备 31011002002714 号