Added babel-plugin-jsx-event-modifier
for event modifiers.
Example:
Vue.component('hello-world', {
methods: {
method () {
console.log('clicked')
}
},
render () {
return (
<div>
<a href="/" onClick:prevent={this.method} />
</div>
)
}
})
More information available on plugin's github page.
Added babel-plugin-jsx-vue-functional
for functional components.
Example:
const A = ({ props }) => <h1>{props.msg}</h1>
const B = ({ listeners }) => (
<div onClick={listeners.click}>
<A msg="Hello World!">
</div>
)
More information available on plugin's github page.
Added babel-plugin-jsx-v-model
for two-way data binding with form elements.
Example:
Vue.component('hello-world', {
data: () => ({
text: 'Hello World!'
}),
render () {
return (
<div>
<input type="text" v-model={this.text} />
{this.text}
</div>
)
}
})
More information available on plugin's github page.