provide/inject 可解决深层组件传值问题
父组件
import { provide } from "vue"; const curValue = ref(props.modelValue); provide('curTabName',curValue);
子组件
import { inject } from "vue"; const curTabName = inject("curTabName");
标签:vue,curTabName,provide,inject,vue3,组件,const From: https://www.cnblogs.com/jlyuan/p/17559697.html