Menu
×
×
正确
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>
不正确
点击 此处 重试 正确
下一题 ❯Local data in a component is sent from a slot withw3exercise_input_no_0, and it can be received in the parent withw3exercise_input_no_1. CompOne.vue: <slotw3exercise_input_no_2:lclData="data"></slot> App.vue: <comp-onew3exercise_input_no_3:"dataFromSlot"> <h2>{{ dataFromSlot.lclData }}</h2> </comp-one> |