需要哪些指令来将数据从组件槽提供给父级?
Local data in a component is sent from a slot with @(6),
and it can be received in the parent with @(6).
CompOne.vue:
<slot @(6):lclData="data"></slot>
App.vue:
<comp-one @(6):"dataFromSlot">
<h2>{{ dataFromSlot.lclData }}</h2>
</comp-one>
Local data in a component is sent from a slot with v-bind,
and it can be received in the parent with v-slot.
CompOne.vue:
<slot v-bind:lclData="data"></slot>
App.vue:
<comp-one v-slot:"dataFromSlot">
<h2>{{ dataFromSlot.lclData }}</h2>
</comp-one>
Local data in a component is sent from a slot with v-bind,
and it can be received in the parent with v-slot.
CompOne.vue:
<slot :lclData="data"></slot>
App.vue:
<comp-one v-slot:"dataFromSlot">
<h2>{{ dataFromSlot.lclData }}</h2>
</comp-one>