<template>
<Student ref="studentEl"></Student>
</template>
<script>
const studentByRef = this.$refs.studentEl;
studentByRef.showStudentName()
</script>
student 组件
App 组件
vue官网ref介绍
vue 中的 ref 简单总结
阅读 143
2022-03-11
<template>
<Student ref="studentEl"></Student>
</template>
<script>
const studentByRef = this.$refs.studentEl;
studentByRef.showStudentName()
</script>
student 组件
App 组件
vue官网ref介绍
相关推荐
精彩评论(0)