//祖先组件 import Son from './Son' export default { components: { Son }, provide () { return { money: 1000000000 } } }子孙组件 <template> <div> 孙子组件 <p>这个是爷爷传给我的钱:{{ money }}</p> </div> </template>
<script> export default { inject: ['money'] } </script>
标签:default,money,Son,export,vue2,组件,跨级,传值 From: https://www.cnblogs.com/txdtxd/p/17858436.html