Skip to content

Latest commit

 

History

History
32 lines (29 loc) · 902 Bytes

README.md

File metadata and controls

32 lines (29 loc) · 902 Bytes

uko-2.0

FOSSA Status

数据劫持实现的mvvm

useage

const test = new Uko({
  el: '#app',
  tpl: `<div>
    hello {{name}}
    <input u-model="food" u-click="add('hello')" type="text" />
    {{food}}
    <button u-click="changeName()">change</button>
  </div>`,
  data: {
    name: 'uko',
    food: 'apple'
  },
  methods: {
    add(e) {
      this.food += e
    },
    changeName() {
      this.name = 'uko 2.0'
    }
  }
})

License

FOSSA Status