doz
Build UI, so simple.
npm install --save doz
<div id="app"></div>
Doz.component('doz-button-counter', {
template(){
return `
<div>
<button onclick="this.myClickHandler()">${this.props.title}</button> <span class="counter">${this.props.counter}</span>
</div>
`
},
props: {
counter: 0
},
myClickHandler() {
this.props.counter += 1;
}
});
new Doz({
root: '#app',
template: `
<doz-button-counter title="Click me!"></doz-button-counter>
<doz-button-counter title="Touch me!"></doz-button-counter>
`
});
Demo
Try now
This project is still under develop.