Vue-mini
This is one for learning! Mini MVVM Library Based on Vue. Js
- About vue-mini: This is a mini framework based on Vue. Js: MVVM,
- Only the core MVVM syntax sugar V-model, vnode and so on. Ps: version 0.0.0 does not add diff patch,
- Change the DOM event binding to: for example @ Click to vm-onclick,
- Some common directives include:: { v-if=vm-if, v-class=vm-class, v-for=vm-for, v-show=vm-show, v-model=vm-model }
- V-bind mode re-modify for example (class="container" :class="testClass") => (class="container {{testClass}}" );
- Lifecycle reserved mounted, updated,
- All other features are removed and the compressed size is 17KB, which I currently use in WebView activity H5
- Compatibility and support: to vue.js
Installation
npm install vue-mini
Examples
html:
vue-mini Click on me to get the current time:{{time}} Used to test vm-show His Name: {{name}} This year's age is{{age}} It's a boy. Family name is:{{item.name}},The relationship is{{item.relation}}
js:
; window { var family = relation: 'Father' name: 'old wang' relation: 'Mother1' name: 'old li 2' relation: 'Mother2' name: 'old li 3' relation: 'Mother3' name: 'old li 4' relation: 'Mother4' name: 'old li 5' relation: 'Mother5' name: 'old li 6' var test = el: '#test' data: name: 'Adi Wang' age: 17 testShow: false time: family: family method: { console testtime = ; } test; var time = }