Vue - Share variable with slot

Posted jzfan

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Vue - Share variable with slot相关的知识,希望对你有一定的参考价值。

Upon further research I have found this:

MyButton.vue

<slot :name="text" slot-scope="slot" :myVar="myVar">
  My Button
</slot>
OtherComponent.vue <my-button> <div :slot="text" slot-scope="slot"> {{ slot.myVar }} </div> </my-button>

https://stackoverflow.com/questions/47094482/vue-share-variable-with-slot

以上是关于Vue - Share variable with slot的主要内容,如果未能解决你的问题,请参考以下文章

[RxJS] Sharing Streams with Share

VM with share disk configuration

php CI_loadview_with_variable

php编译内容

吴恩达 Machine LearningLinear Regression with One Variable

Learn to securely share files on the blockchain with IPFS!