6、ref的作用

87 阅读1分钟

获取dom元素this.$refs.box

获取子组件中的datathis.$refs.box.msg

调用子组件中的方法this.$refs.box.open()