hg-sid
Version:
a front-end simple framework with mvc
57 lines (48 loc) • 895 B
Markdown
a simple front-end framework with mvc
```js
import Sid from '@'
var app = new Sid({
render (h) {
return (
<div>
<h2>check has {this.listCount}</h2>
<ul>
{this.list.map(item => (
<li>{item}</li>
))}
</ul>
</div>
)
},
methods: {
add: function (item) {
this.list.push(item)
}
},
created () {
this.add('phone')
},
computed: {
listCount: function () {
return this.list.length
}
},
data () {
return {
list: ['key', 'money', 'IdCard']
}
}
})
sid.$mount(document.getElementById('app'), app)
```
> v0.1.3 项目名从 Seed 更名为 Sid
> v0.1.2 简化获取虚拟 dom 树的逻辑
> v0.1.1 更新 virtual-dom 结构
> v0.1.0 项目初始化,构建项目基础结构