pvincent 3 years ago
parent
commit
63ed20347b
  1. 6
      src/components/HelloWorld.vue

6
src/components/HelloWorld.vue

@ -15,21 +15,21 @@
</template>
<script lang="ts">
/* standard composition api */
import { ref } from 'vue'
export default {
props: {
msg: { type: String, required: true }
},
/* standard composition api */
setup() {
return {
count: ref(0)
count: ref(5)
}
},
methods: {
inc() {
console.log('increment count')
this.count++ // Rk: note how a ref value can be increment as any common value (ref is a proxy object!)
this.count++
}
}
}

Loading…
Cancel
Save