vuejs / babel-plugin-transform-vue-jsx

babel plugin for vue 2.0 jsx
1.85k stars 132 forks source link

Can not handle the custom event ? #169

Closed sinbargit closed 5 years ago

sinbargit commented 5 years ago

See the code below, In that situation I set a custom-event checked for a div, and emit it. The plugin looks not work here.

<template>
    <div class="tabs-container" >
        <div @click='onChange(left)'>
            {{left+'---'+checked}}
        </div>
        <div @click='onChange(right)'>
            {{right+'---'+checked}}
        </div>
    </div>
</template>
<script>

export default {
    name: 'tabs',
    model: {
        prop: 'checked',
        event: 'change'
    },
    props: ['checked'],
    data: function () {

    },
    methods: {
        onChange(ele) {
            this.$emit('change', ele);
        }
    }
};

</script>

<b-tabs  v-model={this.temp} > </b-tabs>
nickmessing commented 5 years ago

v-model is not supported by this babel plugin, you can use the new preset instead with v-model support: https://github.com/vuejs/jsx