Skip to content

Commit 3e8186c

Browse files
committed
Update playground
1 parent 9d3ae3d commit 3e8186c

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

playground/App.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
<template>
22
<div>
33
<hello-world name="Vue 2" @update="onUpdate" />
4+
5+
<async-component />
46
</div>
57
</template>
68

79
<script setup lang="ts">
10+
import { defineAsyncComponent } from '@vue/composition-api'
11+
812
import HelloWorld from './HelloWorld.vue'
913
14+
const AsyncComponent = defineAsyncComponent(() => import('./Async.vue'))
15+
1016
function onUpdate(e: any) {
1117
// eslint-disable-next-line no-console
1218
console.log(e)

playground/Async.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<div>Async Component</div>
3+
</template>

test/__snapshots__/transform.test.ts.snap

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ export default __sfc_main;
3030
"
3131
`;
3232
33+
exports[`transform fixtures playground/Async.vue 1`] = `
34+
"<template>
35+
<div>Async Component</div>
36+
</template>
37+
"
38+
`;
39+
3340
exports[`transform fixtures playground/Bar.vue 1`] = `
3441
"<template>
3542
<div>Bar</div>

0 commit comments

Comments
 (0)