快速搭建fineui开发环境。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.7 KiB

6 years ago
!(function () {
var ToDoList = BI.inherit(BI.Widget, {
props: {
baseCls: "fine-to-do-list"
},
_store: function () {
return BI.Models.getModel("my.model.todolist");
},
watch: {
todoList: function (items) {
this.todolist.populate(items);
},
doneList: function (items) {
this.donelist.populate(items);
}
},
render: function () {
var self = this, o = this.options;
return {
type: "bi.vtape",
items: [
{
el: {
type: "my.todolist.header",
listeners: [
{
eventName: "EVENT_ADD",
action: function (v) {
self.store.addToDo(v);
}
}
],
height: 40
},
height: 40
}, {
type: "bi.horizontal_auto",
cls: "bi-background",
items: [
{
el: {
type: "my.todolist.list",
ref: function (_ref) {
self.todolist = _ref;
},
text: "正在进行",
listeners: [
{
eventName: "EVENT_CHANGE",
action: function (v) {
self.store.finish(v);
}
}
],
width: 600
}
}, {
el: {
type: "my.todolist.list",
text: "已经完成",
ref: function (_ref) {
self.donelist = _ref;
},
width: 600
}
}
]
}
]
};
}
});
BI.shortcut("my.todolist", ToDoList);
})();