Vue入门 Demo13 组件上面的小细节
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" />
<title>Vue中的组件的细节点</title>
<script src="./vue.js"></script>
</head>
<body>
<!-- is属性解决h5标签上面的小bug,要求在控制台查看tr在tbody的包裹下;包括ul,ol,select等标签-->
<div id="app">
<table>
<tbody>
<tr is="row"></tr>
<tr is="row"></tr>
<tr is="row"></tr>
</tbody>
</table>
</div>
<script>
Vue.component('row',{
template: '<tr><td>this is a row</td></tr>'
})
var vm = new Vue({
el: "#app",
})
</script>
</body>
</html>