码迷,mamicode.com
首页 > 其他好文 > 详细

vue 组件

时间:2018-05-15 19:43:31      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:vue.js   temp   UNC   com   this   http   htm   charset   oct   

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>组件</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
</head>
<body>
<div id="root">
<table>
<tbody>
<tr is="row"></tr>
<tr is="row"></tr>
<tr is="row"></tr>
</tbody>
</table>
</div>
<script>
Vue.component(‘row‘,{
data:function() {
return {
content:‘this is content‘
}
},
template:‘<tr><td>{{content}}</td></tr>‘
});
var vm=new Vue({
el:‘#root‘
})
</script>,
</body>
</html>

vue 组件

标签:vue.js   temp   UNC   com   this   http   htm   charset   oct   

原文地址:https://www.cnblogs.com/guangzhou11/p/9042421.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!