Vue components used in the table

Original link: http://www.cnblogs.com/fordouble/p/7199041.html

<!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>

 

 

Use need is = "my-component" to vue custom component is bound in the Table;

Reproduced in: https: //www.cnblogs.com/fordouble/p/7199041.html

Guess you like

Origin blog.csdn.net/weixin_30902675/article/details/94791104