组件标签的内容取出来使用:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="js/vue.js"></script>
</head>
<body>
<div id="app">
<neirong>这是组件内容
<ul slot="s1">
<li>aaaaaaa</li>
</ul>
<ol slot="s2">
<ul>
bbbbb
</ul>
</ol>
</neirong>
</div>
<template id="neirong">
<div>
<slot name="s2"></slot>
<h1>sdfasf</h1>
</div>
</template>
</body>
<script>
new Vue({
el: "#app",
components:{
'neirong':{
template: "#neirong"
}
}
})
</script>
</html>