使用
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="../js/vue.js" type="text/javascript"></script>
</head>
<body>
<div id="app">
<child>
<div slot="wang">hello wang</div>
<div slot="zhao">hello zhao</div>
<div solt="default"></div>
</child>
</div>
</body>
<script>
Vue.component('child',{
template:`<div>
<slot name="wang"></slot>
<div>world</div>
<slot name="zhao"></slot>
<slot name="defaule">default</slot>
</div>`
})
var app = new Vue({
el:"#app"
})
</script>
</html>