模板:Para:修订间差异
来自星露谷物语扩展百科
更多语言
更多操作
删除的内容 添加的内容
css 清理 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
<includeonly><code class="para {{#if:{{{plain|}}} | para-plain }} nowrap" {{#if:{{{style|}}} | style="{{{style}}}" }}>|{{#if:{{{1|}}} | {{{1}}}= }}{{{2|}}}</code></includeonly><noinclude>{{Documentation|content=<nowiki/> |
<includeonly><code class="para {{#if:{{{plain|}}} | para-plain }} nowrap" {{#if:{{{style|}}} | style="{{{style}}}" }}>|{{#if:{{{1|}}} | {{{1}}}= }}{{{2|}}}</code></includeonly><noinclude>{{Documentation|content=<nowiki/> |
||
== 用法 == |
== 用法 == |
||
用于展示任意模板的某个参数。 |
|||
建议使用行内格式。 |
|||
=== 基本用法 === |
=== 基本用法 === |
||
| 第15行: | 第15行: | ||
}} |
}} |
||
</pre> |
</pre> |
||
* {{p|1}}:可选 |
* {{p|1}}:可选(string),指定需要显示的参数名称。 |
||
* {{p|2}}:可选 |
* {{p|2}}:可选(string),指定需要显示的参数的值。 |
||
* {{p|plain}}:可选 |
* {{p|plain}}:可选(bool),用于取消默认的背景样式。 |
||
* {{p|style}}:可选 |
* {{p|style}}:可选(string),用于设置自定义的样式(CSS)。 |
||
== 示例 == |
== 示例 == |
||
| 第25行: | 第25行: | ||
== 另见 == |
== 另见 == |
||
* {{ |
* {{tl|Template link}} |
||
* {{ |
* {{tl|TemplateCode}} |
||
* {{t|TemplateCode}} |
|||
== 模板数据 == |
|||
<templatedata> |
|||
{ |
|||
"description": { |
|||
"zh": "显示模板的部分内容", |
|||
"zh-hant": "顯示模板的部分內容" |
|||
}, |
|||
"params": { |
|||
"1": { |
|||
"label": { |
|||
"zh": "参数名", |
|||
"zh-hant": "參數" |
|||
}, |
|||
"description": { |
|||
"zh": "指定需要显示的参数名称", |
|||
"zh-hant": "指定需要顯示的參數名稱" |
|||
}, |
|||
"suggested": true, |
|||
"example": "KEY", |
|||
"type": "string" |
|||
}, |
|||
"2": { |
|||
"label": { |
|||
"zh": "参数值", |
|||
"zh-hant": "引數" |
|||
}, |
|||
"description": { |
|||
"zh": "指定需要显示的参数值", |
|||
"zh-hant": "指定需要顯示的參數的值" |
|||
}, |
|||
"example": "VALUE", |
|||
"type": "string" |
|||
}, |
|||
"plain": { |
|||
"label": { |
|||
"zh": "取消背景", |
|||
"zh-hant": "取消背景" |
|||
}, |
|||
"description": { |
|||
"zh": "取消默认的背景样式", |
|||
"zh-hant": "取消預設的背景樣式" |
|||
}, |
|||
"type": "boolean" |
|||
}, |
|||
"style": { |
|||
"label": { |
|||
"zh": "自定义样式", |
|||
"zh-hant": "自訂樣式" |
|||
}, |
|||
"description": { |
|||
"zh": "通过CSS设置一个自定义样式", |
|||
"zh-hant": "通過CSS設置一個自訂樣式" |
|||
}, |
|||
"type": "boolean" |
|||
} |
|||
}, |
|||
"paramOrder": [ |
|||
"1", |
|||
"2", |
|||
"plain", |
|||
"style" |
|||
], |
|||
"format": "inline" |
|||
} |
|||
</templatedata> |
|||
}} |
}} |
||
</noinclude> |
</noinclude> |
||
2025年10月14日 (二) 20:26的最新版本
用法
用于展示任意模板的某个参数。
基本用法
{{p|参数名|参数值}}
完整用法
{{para
|参数名
|参数值
|plain=1
|style=
}}
|1=:可选(string),指定需要显示的参数名称。|2=:可选(string),指定需要显示的参数的值。|plain=:可选(bool),用于取消默认的背景样式。|style=:可选(string),用于设置自定义的样式(CSS)。
示例
另见
{{Template link}}{{TemplateCode}}