问答题
给子组件定义一个ref属性,在父组件就可以使用this.$refs.ref属性名.方法名称假设子组件名称 child,方法show <child ref='my'></child>则: this.$refs.my.show()
给子组件定义一个ref属性,在父组件就可以使用this.$refs.ref属性名.方法名称
假设子组件名称 child,方法show
<child ref='my'></child>
则: this.$refs.my.show()
0
点击进入快速问答通道>>
热门公司面试题
热门面试单题