vue 新手有个问题现在解决不了,求大神帮忙解惑~
创建一个组件,想在组件中去触发实例的私有方法
Vue.component('test',{
……
methods:{
//我想在这里触发vm中的action方法
}
});
var vm=new Vue({
……
methods:{
action:function(){
……
}
}
})
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
子组件触发父组件方法