You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
488 B

<template>
<h1>{{ msg }}</h1>
<button @click="count++">count is: {{ count }}</button>
<button @click="inc">inc</button>
<p>Hello World!</p>
</template>
<script lang="ts">
/* standard composition api */
import { ref } from 'vue'
export default {
props: {
msg: {
type: String,
required: true
}
},
setup() {
return {
count: ref(1)
}
},
methods: {
inc() {
console.log('increment count')
this.count++
}
}
}
</script>