1 获取页面dom元素(父组件通过$ref获取对应的dom元素和子组件信息)

2 获取子组件元素

实例:

比如组件 <HelloWord  ref="helloword/>

this.$refs.helloword.message //获取子组件属性

this.$refs.helloword.add() //获取子组件方法

Logo

前往低代码交流专区

更多推荐