1.父传子 ## index.vue <template> 我是父组件 <Child :str="str" /> </template> <script setup> import Child from "./Child.vue"; import { ref } from "vue"; const str= ref("m"); // 传给子组件的值 </script> -----------------------------------分割线