Closed li-coding closed 4 years ago
Parent component:
<hello-world @test="test"></hello-world> methods: { test(val) { console.log(val) } }
Children component:
methods: { click() { this.$emit('test', 'hello') } }
the parent component test function does not work
sorry, it's working, my mistake
Parent component:
<hello-world @test="test"></hello-world> methods: { test(val) { console.log(val) } }
Children component:
methods: { click() { this.$emit('test', 'hello') } }
the parent component test function does not work