forked from x/volcanos
opt some
This commit is contained in:
parent
dc242594a7
commit
e5c70c0ba8
2
frame.js
2
frame.js
@ -279,7 +279,7 @@ Volcanos("onappend", {help: "渲染引擎", list: [], _init: function(can, meta,
|
|||||||
},
|
},
|
||||||
tree: function(can, list, field, split, cb, target, node) {
|
tree: function(can, list, field, split, cb, target, node) {
|
||||||
node = node || {"": target}; can.core.List(list, function(item) {
|
node = node || {"": target}; can.core.List(list, function(item) {
|
||||||
item[field] && can.core.List(item[field].split(split), function(value, index, array) {
|
item[field] && can.core.List(item[field].split(split), function(value, index, array) { if (!value) { return }
|
||||||
var last = array.slice(0, index).join(split), name = array.slice(0, index+1).join(split)
|
var last = array.slice(0, index).join(split), name = array.slice(0, index+1).join(split)
|
||||||
|
|
||||||
node[name] || (node[name] = can.page.Append(can, node[last], [{view: ["item", html.DIV, value+(index==array.length-1?"":split)], onclick: function(event) {
|
node[name] || (node[name] = can.page.Append(can, node[last], [{view: ["item", html.DIV, value+(index==array.length-1?"":split)], onclick: function(event) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<head>
|
<head>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=0.8,user-scalable=no">
|
||||||
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" type="text/css" href="/page/cmd.css">
|
<link rel="stylesheet" type="text/css" href="/page/cmd.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user