Skip to content

Commit

Permalink
chore: update playground
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 22, 2022
1 parent 5c27ac3 commit 8b734b9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 2 additions & 6 deletions playground/HelloWorld.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
<script setup lang="ts">
const props = defineProps<{ msg: string }>()
defineProps<{ msg: string }>()
const emit = defineEmits(['update'])
const count = ref(0)
const doubled = computed(() => count.value * 2)
function inc() {
count.value += 1
}
Expand All @@ -14,7 +11,6 @@ function dec() {
}
const decText = '<b>Dec</b>'
watch(count, value => emit('update', value))
</script>

Expand All @@ -24,7 +20,7 @@ watch(count, value => emit('update', value))
<button @click="inc">
Inc
</button>
<div>{{ count }} x 2 = {{ doubled }}</div>
<div>{{ doubled / 2 }} x 2 = {{ doubled }}</div>
<button @click="dec()" v-html="decText" />
</div>
</template>
3 changes: 3 additions & 0 deletions playground/composables/foo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ export function useFoo() {
}

export const FOOBAR = 'auto import in Vue template'

export const count = ref(0)
export const doubled = computed(() => count.value * 2)
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"moduleResolution": "node",
"esModuleInterop": true,
"strict": true,
"jsx": "preserve",
"strictNullChecks": true,
"resolveJsonModule": true
}
Expand Down

0 comments on commit 8b734b9

Please sign in to comment.