Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user