16 lines
255 B
JavaScript
16 lines
255 B
JavaScript
Vue.component('my-component', {
|
|
props: ['title'],
|
|
template: `
|
|
<div class="head">
|
|
<h1 @click="show">{{title}}ddd{{message}}</h1>
|
|
</div>
|
|
`,
|
|
data: function(){
|
|
return {message: 'helloa'}
|
|
},
|
|
methods: {
|
|
show() {
|
|
alert();
|
|
}
|
|
}
|
|
}) |