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

6
src/components/HelloWorld.vue

@ -15,21 +15,21 @@
</template> </template>
<script lang="ts"> <script lang="ts">
/* standard composition api */
import { ref } from 'vue' import { ref } from 'vue'
export default { export default {
props: { props: {
msg: { type: String, required: true } msg: { type: String, required: true }
}, },
/* standard composition api */
setup() { setup() {
return { return {
count: ref(0)
count: ref(5)
} }
}, },
methods: { methods: {
inc() { inc() {
console.log('increment count') 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