|
|
@ -70,26 +70,24 @@ |
|
|
|
var store = BI.useStore(function () { |
|
|
|
var store = BI.useStore(function () { |
|
|
|
return BI.Models.getModel("demo.model"); |
|
|
|
return BI.Models.getModel("demo.model"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
// setInterval(function () { |
|
|
|
setInterval(function () { |
|
|
|
// store.toggle(); |
|
|
|
store.toggle(); |
|
|
|
// }, 1000); |
|
|
|
}, 1000); |
|
|
|
return function () { |
|
|
|
return function () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
type: "bi.vertical", |
|
|
|
type: "bi.vertical", |
|
|
|
vgap: 20, |
|
|
|
vgap: 20, |
|
|
|
items: BI.makeArray(10000).map(function (i) { |
|
|
|
items: [{ |
|
|
|
return { |
|
|
|
type: "demo.child" |
|
|
|
type: "bi.label", |
|
|
|
}, { |
|
|
|
text: i |
|
|
|
type: "demo.child" |
|
|
|
}; |
|
|
|
}] |
|
|
|
}) |
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.shortcut("demo.parent", Widget); |
|
|
|
BI.shortcut("demo.parent", Widget); |
|
|
|
var time = performance.now(); |
|
|
|
BI.createWidget({ |
|
|
|
var widget = BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.absolute", |
|
|
|
type: "bi.absolute", |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
el: { |
|
|
|
el: { |
|
|
@ -99,10 +97,7 @@ |
|
|
|
left: 100 |
|
|
|
left: 100 |
|
|
|
}], |
|
|
|
}], |
|
|
|
element: "#wrapper" |
|
|
|
element: "#wrapper" |
|
|
|
// root: true |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
// widget.element.appendTo("#wrapper"); |
|
|
|
|
|
|
|
console.log(performance.now() - time); |
|
|
|
|
|
|
|
</script> |
|
|
|
</script> |
|
|
|
</body> |
|
|
|
</body> |
|
|
|
</html> |
|
|
|
</html> |
|
|
|