0

Here is MyCompnent

props: ['visible']
  methods: {
    update () {
     this.$emit('update:visible')
  }
}

I use this component in jsx:

<MyComponent visible={this.visible} {...{['on-update:visible']: console.log}} />

but can not bind the event.

so how to bind this event in jsx.

1 Answer 1

1

I have find the answer from the example https://github.com/vuejs/babel-plugin-transform-vue-jsx/blob/master/example/example.js

It cant write like this:

<MyComponent visible={this.visible} {...{on:{'update:visible': console.log}} />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.