This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-06-20 08:39:34 +08:00
parent b1c7d0a18a
commit b0f6f5ac82

View File

@ -1,8 +1,10 @@
Volcanos(chat.ONIMPORT, {
_init: function(can, msg) { var width = can.onimport.width(can, 80, msg.Length())
_init: function(can, msg) {
var width = can.onimport.width(can, 80, msg.Length())
can.page.Append(can, can._output, msg.Table(function(value) {
var cb = can.onimport[value.unit]||can.onimport.unit
return {view: html.ITEM, style: {width: width}, list: [
// return {view: html.ITEM, style: {width: width}, list: [
return {view: html.ITEM, list: [
{view: html.VALUE, list: cb(can, value.value, value.unit||"")},
{view: html.TITLE, list: [{text: value.title||value.index.split(".").pop()}]},
]}
@ -21,4 +23,12 @@ Volcanos(chat.ONIMPORT, {
var count = (parseInt(can.ConfWidth()/min)); if (length < count) { count = length }
return can.ConfWidth()/(count||1)
},
})
/*
layout: function(can) {
var width = can.onimport.width(can, 80, msg.Length())
can.page.Select(can, can._output, html.DIV_ITEM, function(target) {
target.width
})
},
*/
})