diff --git a/scripts/tags/lib/okr.js b/scripts/tags/lib/okr.js index 45a1766..cbc4c91 100644 --- a/scripts/tags/lib/okr.js +++ b/scripts/tags/lib/okr.js @@ -54,6 +54,7 @@ function generateKRList(ctx, contentArray) { } function layoutItem(ctx, type, index, title, note, color, label, percent) { + const percentStr = (percent * 100).toString().replace(/\.\d*/, '') return `
@@ -66,10 +67,10 @@ function layoutItem(ctx, type, index, title, note, color, label, percent) {
${label} - ${percent * 100}% + ${percentStr}%
-
+
@@ -114,7 +115,8 @@ module.exports = ctx => function(args, content = '') { (accumulator, currentValue) => accumulator + currentValue, 0, ); - const oPercent = Number(oMeta.percent) || (krPercentSum / krPercentList.length) + + const oPercent = Number(oMeta.percent) || (krPercentSum / krPercentList.length).toFixed(2) var status = null if (args.status != null && args.status && statusList[args.status]) { status = statusList[args.status]