This commit is contained in:
尹吉欢
2018-04-08 19:25:02 +08:00
parent fcfb9d68b4
commit 6f70e1de86
@@ -6,7 +6,7 @@
</head> </head>
<body> <body>
<div id="example"> <div id="example">
<my-component title="yjh"></my-component> <my-component v-bind:title="title"></my-component>
</div> </div>
<script type="text/javascript" src="../../js/vue.js" ></script> <script type="text/javascript" src="../../js/vue.js" ></script>
@@ -14,7 +14,12 @@
<script> <script>
// 创建根实例 // 创建根实例
new Vue({ new Vue({
el: '#example' el: '#example',
data:{
title:""
},mounted:function(){
this.title = 'WWW'
}
}) })
</script> </script>
</body> </body>