VUE 入门
VUE 指令
VUE 方法
VUE 计算属性
VUE 观察者
VUE 扩展
VUE 组件
VUE 插槽
VUE 引用
VUE 生命周期钩子
VUE 提供/注入
VUE 路由
VUE 动画
VUE 构建

Menu
×
×
正确

练习:

为了从组件插槽向父组件提供数据,需要哪些指令?

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 with , 
and it can be received in the parent with .

CompOne.vue:
<slot :lclData="data"></slot>

App.vue:
<comp-one :"dataFromSlot">
  <h2>{{ dataFromSlot.lclData }}</h2>
</comp-one>







×

重置分数?