vue 组件在table 内的使用

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Vue Components</title>
<script src="vue.js"></script>
</head>
<body>
<div id="app">
<table>
<tbody is="my-component"></tbody>
</table>
</div>
<script>
Vue.component('my-component', {
template: '<div>Table</div>'
});
new Vue({
el: '#app'
})
</script>
</body>
</html>

在table 内使用 需要用  is="my-component" 来进行vue自定义组件的绑定;

原文地址:https://www.cnblogs.com/fordouble/p/7199041.html