From a34814261afa918a3d419421368c63b20a730d14 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 18 Feb 2025 11:18:25 +0800 Subject: [PATCH] add some --- lib/page.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/page.js b/lib/page.js index a049c24d..e6dc82a6 100644 --- a/lib/page.js +++ b/lib/page.js @@ -198,8 +198,9 @@ Volcanos("page", { if (value == undefined) { return {view: [key, "col"]} } return {view: [[key, "option"], "col"]} } }) }, {type: html.THEAD}, {type: html.TBODY}, ]}]) + var option = can.core.Item(can.Option()) can.page.Append(can, ui.thead, [{type: html.TR, data: {dataset: {index: -1}}, list: can.core.List(list, function(key) { - if (key[0] != "_") { return {type: html.TH, list: [{text: can.user.trans(can, key, null, html.INPUT)}, {icon: "bi bi-sort-down-alt"}, {icon: "bi bi-sort-up"}]} } + if (key[0] != "_") { return {className: option.indexOf(key) > -1? ice.MSG_OPTION: key == ctx.ACTION? ctx.ACTION: "", type: html.TH, list: [{text: can.user.trans(can, key, null, html.INPUT)}, {icon: "bi bi-sort-down-alt"}, {icon: "bi bi-sort-up"}]} } }) }]) can.page.Append(can, ui.tbody, can.core.List(msg.Table(), function(item, index, array) { return {dataset: {index: index}, className: item[mdb.STATUS], td: can.core.List(list, function(key) { if (key[0] != "_") { return cb(can.page.Color(item[key]).trim(), key, index, item, array) } }) }