<template> <Student ref="studentEl"></Student> </template> <script> const studentByRef = this.$refs.studentEl; studentByRef.showStudentName() </script> student 组件 App 组件 vue官网ref介绍