2019-03-11 11:03:03

vue 父组件调用子组件里的方法

上一篇文章:

vue nextTick同步回调函数

下一篇文章:

vue实现关键字模糊搜索

vue 父组件调用子组件里的方法

父组件:
<Test  ref="child"></Test>
methods: {
	Fn(){
	  let obj=this.$refs.child.Fn2("123456789");
	}
},
子组件:
methods: {
	Fn2(i){
	  console.log(i);
	}
},
输出结果:123456789
当前文章内容为原创转载请注明出处:http://www.good1230.com/detail/2019-03-11/354.html
最后生成于 2023-06-18 18:32:52
上一篇文章:

vue nextTick同步回调函数

下一篇文章:

vue实现关键字模糊搜索

此内容有帮助 ?
0