Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1

This commit is contained in:
zongzhimin
2018-04-08 17:33:38 +08:00
2 changed files with 36 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
Vue.component('my-component', {
template: `
<div class="head">
<h1 @click="show">ddd{{message}}</h1>
</div>
`,
data: function(){
return {message: 'helloa'}
},
methods: {
show() {
alert();
}
}
})
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div id="example">
<my-component></my-component>
</div>
<script type="text/javascript" src="../../js/vue.js" ></script>
<script type="text/javascript" src="component.js" ></script>
<script>
// 创建根实例
new Vue({
el: '#example'
})
</script>
</body>
</html>