Vue JSX writes the page and calls the click event

Hits: 0

  • How do I call the event when the tag code is JSXwritten by ?Vue

  • Home.vue

    <script>
    export default {
    methods: {
    touchClick () {
    console .log( 'click success' )
    }
    },
    render () {
    return (
    < div onClick = {this.touchClick} > page content </ div >
    )
    }
    }
    </script>

  • Effect

You may also like...

Leave a Reply

Your email address will not be published.