“模板:Yesno”的版本间的差异
(创建页面,内容为“{{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }} |no |n |false |0 = {{{no|<!-- null -->}}} |…”) |
(没有差异)
|
2022年7月10日 (日) 10:39的最新版本
一个设置是与否的模板,返回结果为“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 |