使用vue写的。主要用到的技术点,是子组件向父组件传值。
在父组件上,定义一个回掉函数:
@child-event="evt"
相应地,在子组件上:
this.$emit("child-event", 值1, 值2,值n);
演示:
使用vue写的。主要用到的技术点,是子组件向父组件传值。
在父组件上,定义一个回掉函数:
@child-event="evt"
相应地,在子组件上:
this.$emit("child-event", 值1, 值2,值n);
演示: