模板:Progression/doc
| File:Edit-copy green.svg | 此頁面是Template:Progression的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
語法[編輯]
{{Progression|百分數}}百分数,取0至100間的數字,不帶%。{{Progression|參數1|參數2}}- 利用
param1/param2自動計算完成度百分比。 {{Progression|參數1|參數2|task=參數3}}- 顯示任務名稱。
例子[編輯]
單參數[編輯]
{{Progression|0}} :
| 已完成0% | |
{{Progression|0.5}} :
| 已完成0.5% | ||
{{Progression|1}} :
| 已完成1% | ||
{{Progression|36.7}} :
| 已完成36.7% | ||
{{Progression|100}} :
| 已完成100% | |
雙參數[編輯]
{{Progression|0|250}} :
| 已完成0% | |
{{Progression|100|250}} :
| 已完成40% | ||
{{Progression|200|300}} :
| 已完成66.7% | ||
{{Progression|300|300}} :
| 已完成100% | |
三參數[編輯]
{{Progression|0|250|task=整理文章}} :
| 整理文章: 已完成0% | |
{{Progression|100|250|task=整理文章}} :
| 整理文章: 已完成40% | ||
TemplateData[編輯]
<templatedata>{ "params": { "1": { "label": "值", "description": "進度的當前值。", "type": "number", "suggested": true }, "2": { "aliases": [ "total" ], "label": "最大值", "description": "進度條的最大值,即總共的值。", "type": "number", "default": "100" }, "width": { "label": "寬度", "description": "進度條的CSS寬度。", "example": "100px、30em", "type": "string" }, "task": { "description": "顯示在數值前的名稱。", "example": "整理文章", "type": "line", "label": "任務名稱" }, "decimal": { "description": "小數取整到的位數。", "type": "number", "label": "小數" }, "hidecomplete": { "label": "隱藏完成", "description": "是否隱藏當前完成度的顯示。", "type": "boolean", "default": "0" } }, "description": "此模板用於建立進度條。", "paramOrder": [ "1", "2", "width", "task", "decimal", "hidecomplete" ], "format": "inline" }</templatedata>