|
|
| (未显示同一用户的1个中间版本) |
| 第1行: |
第1行: |
| <includeonly>{{#if:{{#varexists:Para}}||{{#vardefineecho:Para|{{#css:code.para.para-plain { | | <includeonly><code class="para {{#if:{{{plain|}}} | para-plain }} nowrap" {{#if:{{{style|}}} | style="{{{style}}}" }}>|{{#if:{{{1|}}} | {{{1}}}= }}{{{2|}}}</code></includeonly><noinclude>{{Documentation|content=<nowiki/> |
| border: none;
| |
| background-color: inherit;
| |
| } }} }}}}<code class="para {{#if:{{{plain|}}} | para-plain }} nowrap" {{#if:{{{style|}}} | style="{{{style}}}" }}>|{{#if:{{{1|}}} | {{{1}}}= }}{{{2|}}}</code></includeonly><noinclude>
| |
| == 用法 == | | == 用法 == |
| 建议使用行内格式。
| | 用于展示任意模板的某个参数。 |
|
| |
|
| === 基本用法 === | | === 基本用法 === |
| 第18行: |
第15行: |
| }} | | }} |
| </pre> | | </pre> |
| * {{p|1}}:可选(字符串),指定需要显示的参数名称。 | | * {{p|1}}:可选(string),指定需要显示的参数名称。 |
| * {{p|2}}:可选(字符串),指定需要显示的参数值。 | | * {{p|2}}:可选(string),指定需要显示的参数的值。 |
| * {{p|plain}}:可选(布尔值),用于取消默认的背景样式。 | | * {{p|plain}}:可选(bool),用于取消默认的背景样式。 |
| * {{p|style}}:可选(字符串),设置自定义样式(CSS)。 | | * {{p|style}}:可选(string),用于设置自定义的样式(CSS)。 |
|
| |
|
| == 示例 == | | == 示例 == |
| 第28行: |
第25行: |
|
| |
|
| == 另见 == | | == 另见 == |
| * {{t|Param}} | | * {{tl|Template link}} |
| * {{t|Template link}}
| | * {{tl|TemplateCode}} |
| * {{t|TemplateCode}} | | }} |
| | | </noinclude> |
| == 模板数据 ==
| |
| <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>
| |
用法
用于展示任意模板的某个参数。
基本用法
{{p|参数名|参数值}}
完整用法
{{para
|参数名
|参数值
|plain=1
|style=
}}
|1=:可选(string),指定需要显示的参数名称。
|2=:可选(string),指定需要显示的参数的值。
|plain=:可选(bool),用于取消默认的背景样式。
|style=:可选(string),用于设置自定义的样式(CSS)。
示例
{{p|key|value}}:|key=value
{{p|plain=1|key|value}}:|key=value
另见