我的父组件片段:
methods: { test: function () { console.log('from test method') } } <template> <child-component test="test"><child-component> </template>
子组件片段
created: { this.test() //returns test is not a function },props: ['test']
有人可以帮忙吗?
提前致谢!
< child-component:test =“test”>< child-component>“