2,367
个编辑
更改
模板:Note
,无编辑摘要
<onlyinclude><div class="alert alert-{{ #ifeq:{{{type|}}}| tips | success | {{{type}}} }}">
{| cellspacing="0"
| [[Image:icon-{{ #ifeq:{{{type|}}}| tips | tips | info }}.png|none]]
| style="padding-left:8px;" | <small>{{{text}}}</small>
|}</div></onlyinclude>
<noinclude>
<templatedata>
{
"params": {
"text": {
"label": "内容文本",
"required": true,
"description": "请填写要提示的内容"
},
"type": {
"label": "内容级别",
"suggested": true,
"description": "请设置提示的模板风格",
"example": "info, warning, danger,tips(tips图标不同)"
}
},
"paramOrder": [
"text",
"type"
]
}
</templatedata>
== 用法举例 ==
<pre>
{{note|text=这里填写提示的内容|type=这里设置模板风格,若不设置,为默认为warning}}
</pre>
例如风格:<code>type=success</code>
{{note|text=success风格用于赞赏性的提示,表示很好,做的很对|type=success}}
例如风格:<code>type=info</code>
{{note|text=info风格用于一般性消息提示,单纯的告知。|type=info}}
例如风格:<code>type=warning</code>
{{note|text=warning风格用于警告性的消息提示,需要用户注意|type=warning}}
例如风格:<code>type=danger</code>
{{note|text=danger风格用于禁止性的消息提示,需要用户避免|type=danger}}
例如风格:<code>type=tips</code>
{{note|text=tips风格用于禁止性的消息提示,需要用户避免|type=tips}}
</noinclude>
{| cellspacing="0"
| [[Image:icon-{{ #ifeq:{{{type|}}}| tips | tips | info }}.png|none]]
| style="padding-left:8px;" | <small>{{{text}}}</small>
|}</div></onlyinclude>
<noinclude>
<templatedata>
{
"params": {
"text": {
"label": "内容文本",
"required": true,
"description": "请填写要提示的内容"
},
"type": {
"label": "内容级别",
"suggested": true,
"description": "请设置提示的模板风格",
"example": "info, warning, danger,tips(tips图标不同)"
}
},
"paramOrder": [
"text",
"type"
]
}
</templatedata>
== 用法举例 ==
<pre>
{{note|text=这里填写提示的内容|type=这里设置模板风格,若不设置,为默认为warning}}
</pre>
例如风格:<code>type=success</code>
{{note|text=success风格用于赞赏性的提示,表示很好,做的很对|type=success}}
例如风格:<code>type=info</code>
{{note|text=info风格用于一般性消息提示,单纯的告知。|type=info}}
例如风格:<code>type=warning</code>
{{note|text=warning风格用于警告性的消息提示,需要用户注意|type=warning}}
例如风格:<code>type=danger</code>
{{note|text=danger风格用于禁止性的消息提示,需要用户避免|type=danger}}
例如风格:<code>type=tips</code>
{{note|text=tips风格用于禁止性的消息提示,需要用户避免|type=tips}}
</noinclude>