<
template
>
<
main-layout
>
<
p
>Welcome home
</
p
>
<
div
@click="
show2()"
>
<
input
type
=
"button"
value
=
"按钮"
@click.
stop
="
show
()"
>
</
div
>
</
main-layout
>
</
template
>
<
script
>
import
MainLayout
from
'../layouts/Main.vue'
export
default {
methods:{
show:
function() {
alert(
1);
},
show2:
function() {
alert(
2);
}
},
components: {
MainLayout
}
}
</
script
>