hg-sid

0.1.3 • Public • Published

sid

a simple front-end framework with mvc

Usage

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)

Changelog

2019.1.11

v0.1.3 项目名从 Seed 更名为 Sid

2018.10.26

v0.1.2 简化获取虚拟 dom 树的逻辑

2018.8.14

v0.1.1 更新 virtual-dom 结构

2018.8.12

v0.1.0 项目初始化,构建项目基础结构

Readme

Keywords

Package Sidebar

Install

npm i hg-sid

Weekly Downloads

3

Version

0.1.3

License

MIT

Unpacked Size

114 kB

Total Files

73

Last publish

Collaborators

  • hanger