vue2.0 passes new data (slots) like child components

Parent component 
<componentA>
<p>123</p>
</componentA>
child component
<template> 
<div>
{{boonook}}
<button @click ="emitMyEvent">emit</button>
<slot></slot>
</div>
</template>
There can also be a default value in the slot, when After adding content to the parent component, it will be overwritten, if not, the content in the slot will be displayed by default

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325210358&siteId=291194637