模板:Yesno:修订间差异

删除1,226字节 、​ 2020年10月17日 (星期六)
// Edit via Wikiplus
(创建辅助模板)
 
(// Edit via Wikiplus)
<includeonly>{{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }}
|no
|n
|1 = {{{yes|yes}}}
|#default = {{{def|{{{yes|yes}}}}}}
}}</includeonly><noinclude>
{{doc}}
一个设置是与否的模板,返回结果为“Yes”与空格。
==用法==
<nowiki>{{Yesno|(参数,不填则显示为空,默认显示Yes)}}</nowiki>
===所有返回Yes的参数===
{| class="wikitable"
|-
! 参数 !! 用法 !! 值
|-
| yes || <nowiki>{{Yesno|yes}}</nowiki> || {{Yesno|yes}}
|-
| y || <nowiki>{{Yesno|y}}</nowiki> || {{Yesno|y}}
|-
| true || <nowiki>{{Yesno|true}}</nowiki> || {{Yesno|true}}
|-
| 1 || <nowiki>{{Yesno|1}}</nowiki> || {{Yesno|1}}
|}
===返回空值的参数(No部分)===
{| class="wikitable"
|-
! 参数 !! 用法 !! 值
|-
| no || <nowiki>{{Yesno|no}}</nowiki> || {{Yesno|no}}
|-
| n || <nowiki>{{Yesno|n}}</nowiki> || {{Yesno|n}}
|-
| false || <nowiki>{{Yesno|false}}</nowiki> || {{Yesno|false}}
|-
| 0 || <nowiki>{{Yesno|0}}</nowiki> || {{Yesno|0}}
|}
 
===返回空值的参数(空白部分)===
{| class="wikitable"
|-
! 参数 !! 用法 !! 值
|-
| || <nowiki>{{Yesno| }}</nowiki> || {{Yesno| }}
|-
| ¬ || <nowiki>{{Yesno|¬}}</nowiki> || {{Yesno|¬}}
|}
 
===默认值===
当参数不为以上值时,默认返回yes。
{| class="wikitable"
|-
! 参数 !! 用法 !! 值
|-
| OK || <nowiki>{{Yesno|OK}}</nowiki> || {{Yesno|OK}}
|-
| Cancel || <nowiki>{{Yesno|Cancel}}</nowiki> || {{Yesno|Cancel}}
|}
[[分类:辅助模板]]</noinclude>
行政员、​优秀编辑者、​界面管理员、​监督员、​管理员、​小部件编辑者
3,123

个编辑