MCBBS Wiki欢迎您共同参与编辑!在参与编辑之前请先阅读Wiki方针。
如果在编辑的过程中遇到了什么问题,可以去讨论板提问。
为了您能够无阻碍地参与编辑 未验证/绑定过邮箱的用户,请尽快绑定/验证。
MCBBS Wiki GitHub群组已上线!
您可以在回声洞中发表吐槽!
服务器状态监控。点击进入
本站由MCBBS用户自行搭建,与MCBBS及东银河系漫游指南(北京)科技有限公司没有从属关系。点此了解 MCBBS Wiki 不是什么>>
模板:Yesno:修订间差异
跳到导航
跳到搜索
(// Edit via Wikiplus) |
小 (恢复MashKJo(讨论)的编辑至Sheep-realms的最后版本) 标签:回退 |
||
| 第1行: | 第1行: | ||
{{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} | |||
|no | |no | ||
|n | |n | ||
| 第11行: | 第11行: | ||
|1 = {{{yes|yes}}} | |1 = {{{yes|yes}}} | ||
|#default = {{{def|{{{yes|yes}}}}}} | |#default = {{{def|{{{yes|yes}}}}}} | ||
}}</ | }}<noinclude> | ||
{{ | 一个设置是与否的模板,返回结果为“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> | [[分类:辅助模板]]</noinclude> | ||
2020年10月17日 (六) 20:19的最新版本
一个设置是与否的模板,返回结果为“Yes”与空格。
用法
{{Yesno|(参数,不填则显示为空,默认显示Yes)}}
所有返回Yes的参数
| 参数 | 用法 | 值 |
|---|---|---|
| yes | {{Yesno|yes}} | yes |
| y | {{Yesno|y}} | yes |
| true | {{Yesno|true}} | yes |
| 1 | {{Yesno|1}} | yes |
返回空值的参数(No部分)
| 参数 | 用法 | 值 |
|---|---|---|
| no | {{Yesno|no}} | |
| n | {{Yesno|n}} | |
| false | {{Yesno|false}} | |
| 0 | {{Yesno|0}} |
返回空值的参数(空白部分)
| 参数 | 用法 | 值 |
|---|---|---|
| {{Yesno| }} | ||
| ¬ | {{Yesno|¬}} |
默认值
当参数不为以上值时,默认返回yes。
| 参数 | 用法 | 值 |
|---|---|---|
| OK | {{Yesno|OK}} | yes |
| Cancel | {{Yesno|Cancel}} | yes |