模板:Progression/doc

維基百科,自由的百科全書
跳至導覽 跳至搜尋

語法[編輯]

{{Progression|百分數}}
百分数,取0至100間的數字,不帶%
{{Progression|參數1|參數2}}
利用param1/param2自動計算完成度百分比。
{{Progression|參數1|參數2|task=參數3}}
顯示任務名稱。

例子[編輯]

單參數[編輯]

{{Progression|0}} :

{{Progression|0.5}} :

{{Progression|1}} :

{{Progression|36.7}} :

{{Progression|100}} :

雙參數[編輯]

{{Progression|0|250}} :

{{Progression|100|250}} :

{{Progression|200|300}} :

{{Progression|300|300}} :

三參數[編輯]

{{Progression|0|250|task=整理文章}} :

{{Progression|100|250|task=整理文章}} :

TemplateData[編輯]

以下是該模板的模板資料,適用於視覺化編輯器等工具。

Progression模板資料

<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>