编辑 模块:Yesno 0 根据下列点原因,你没有权限进行操作编辑本页: 您刚才请求的操作只有以下用户组中的用户才能使用: 用户, FANDOM员工, FANDOM助手, Wiki主管, 内容团队人员 此页面已被保护,因为这个页面被以下已标注“联锁保护”的一个被保护页面包含: 社区中心 Please log in to edit this wiki.Joining 社区中心 is free, and it only takes a minute.We hope that you sign in, and become a member of the community!Click here to log in or create an account 更多 + 您可以查看并复制此页面的源代码: -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to the template {{yesno}}. return function (val, default) -- If your wiki uses non-ascii characters for any of "yes", "no", etc., you -- should replace "val:lower()" with "mw.ustring.lower(val)" in the -- following line. val = type(val) == 'string' and val:lower() or val if val == nil then return nil elseif val == true or val == 'yes' or val == 'y' or val == 'true' or val == 't' or val == '是' or tonumber(val) == 1 then return true elseif val == false or val == 'no' or val == 'n' or val == 'false' or val == 'f' or val == '否' or tonumber(val) == 0 then return false else return default end end 该页面使用的模板: Template:Yesno (查看源代码) 返回到模块:Yesno。 编辑摘要 预览 显示差异