Browse Source

useful remarks for developers

master
pvincent 4 years ago
parent
commit
128d46ddb6
  1. 2
      TODO.md
  2. 5
      src/App.vue
  3. 4
      src/components/HelloWorld.vue

2
TODO.md

@ -8,7 +8,7 @@ TODO
* [x] git version control awareness * [x] git version control awareness
* [x] eslint * [x] eslint
* [x] licence support * [x] licence support
* [ ] composition API
* [x] composition API
* [ ] WindyCss * [ ] WindyCss
* [ ] fake rest api * [ ] fake rest api
* [ ] i18n * [ ] i18n

5
src/App.vue

@ -11,16 +11,15 @@
<script lang="ts"> <script lang="ts">
/* eslint-disable no-undef */ /* eslint-disable no-undef */
import HelloWorld from './components/HelloWorld.vue' import HelloWorld from './components/HelloWorld.vue'
export default { export default {
name: 'App',
components: { components: {
HelloWorld HelloWorld
}, },
setup() { setup() {
return { return {
title: APP_TITLE,
title: APP_TITLE, //Rk: note the 'eslint-disable no-undef' comment above
version: APP_VERSION, version: APP_VERSION,
origin: APP_ORIGIN origin: APP_ORIGIN
} }

4
src/components/HelloWorld.vue

@ -18,13 +18,13 @@ export default {
}, },
setup() { setup() {
return { return {
count: ref(1)
count: ref(0)
} }
}, },
methods: { methods: {
inc() { inc() {
console.log('increment count') console.log('increment count')
this.count++
this.count++ // Rk: note how a ref value can be increment as any common value (ref is a proxy object!)
} }
} }
} }

Loading…
Cancel
Save