Skip to content

Commit 8b734b9

Browse files
committed
chore: update playground
1 parent 5c27ac3 commit 8b734b9

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

playground/HelloWorld.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<script setup lang="ts">
2-
const props = defineProps<{ msg: string }>()
2+
defineProps<{ msg: string }>()
33
const emit = defineEmits(['update'])
44
5-
const count = ref(0)
6-
const doubled = computed(() => count.value * 2)
7-
85
function inc() {
96
count.value += 1
107
}
@@ -14,7 +11,6 @@ function dec() {
1411
}
1512
1613
const decText = '<b>Dec</b>'
17-
1814
watch(count, value => emit('update', value))
1915
</script>
2016

@@ -24,7 +20,7 @@ watch(count, value => emit('update', value))
2420
<button @click="inc">
2521
Inc
2622
</button>
27-
<div>{{ count }} x 2 = {{ doubled }}</div>
23+
<div>{{ doubled / 2 }} x 2 = {{ doubled }}</div>
2824
<button @click="dec()" v-html="decText" />
2925
</div>
3026
</template>

playground/composables/foo.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ export function useFoo() {
33
}
44

55
export const FOOBAR = 'auto import in Vue template'
6+
7+
export const count = ref(0)
8+
export const doubled = computed(() => count.value * 2)

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"moduleResolution": "node",
77
"esModuleInterop": true,
88
"strict": true,
9+
"jsx": "preserve",
910
"strictNullChecks": true,
1011
"resolveJsonModule": true
1112
}

0 commit comments

Comments
 (0)