forked from fanruan/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.
30 lines
555 B
30 lines
555 B
4 years ago
|
if (this.importScripts) {
|
||
4 years ago
|
importScripts("../dist/fineui_without_jquery_polyfill.js");
|
||
4 years ago
|
BI.initWorker();
|
||
|
}
|
||
4 years ago
|
var Model = BI.inherit(Fix.Model, {
|
||
|
state: function () {
|
||
|
return {
|
||
|
count: 0
|
||
|
};
|
||
|
},
|
||
|
|
||
|
computed: {
|
||
|
name: function () {
|
||
|
return this.getText(this.model.count);
|
||
|
}
|
||
|
},
|
||
|
|
||
|
actions: {
|
||
|
addCount: function () {
|
||
|
this.model.count += 1;
|
||
|
}
|
||
|
},
|
||
|
|
||
|
getText (count) {
|
||
|
return "被点击了" + count + "次";
|
||
|
}
|
||
|
});
|
||
|
|
||
|
BI.model("demo.model", Model);
|