<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>单slot插槽</title>
</head>
<body>
<div id="app">
<children>
<span>注册成功</span>
</children>
</div>
<script src="../js/vue.js"></script>
<script>
let vm = new Vue({
el:'#app',
components:{
children:{
template:'<button>这是子组件</button>'
}
}
});
</script>
</body>
</html>
vue-例5-11单slot插槽.html
最新推荐文章于 2024-08-22 14:32:34 发布