Vue: parent component get child component data using slot & v-bind
"en"> "UTF-8"> "description" content=""> "keywords" content="bait bark"> "X-UA-Compatible" content="IE=edge"> "viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">Vehemence "vail">"tt">
default="namess"> {{namess.data.join('~')}} {{namess}}
- for="name in namess.data.concat(namesa)">{{name}}
"background-color: peru;width:200px;height:200px;margin: 20px;"> "names" :datum="55">
- for="name in names">{{name}}
v-slot作为连接桥梁, 子组件通过 v-bind 绑定了 data & datum, 组成了一个对象, 父组件通过v-slot:default="namess" namess变量接收了组成的object
一下为具名v-slot
"en"> "UTF-8"> "description" content=""> "keywords" content="bait bark"> "X-UA-Compatible" content="IE=edge"> "viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">Vehemence "vail">"tt">
default="namess"> {{namess.data.join('~')}} {{namess}}
- for="name in namess.data.concat(namesa)">{{name}}
"surrogate">
- for="name in surrogate.data.concat(namesa)">{{name}} {{i}}
"background-color: peru;width:200px;height:200px;margin: 20px;"> "surrogate" v-bind:data="names" :datum="55">
- for="name in names">{{name}}