File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div >
3
3
<hello-world name =" Vue 2" @update =" onUpdate" />
4
+
5
+ <async-component />
4
6
</div >
5
7
</template >
6
8
7
9
<script setup lang="ts">
10
+ import { defineAsyncComponent } from ' @vue/composition-api'
11
+
8
12
import HelloWorld from ' ./HelloWorld.vue'
9
13
14
+ const AsyncComponent = defineAsyncComponent (() => import (' ./Async.vue' ))
15
+
10
16
function onUpdate(e : any ) {
11
17
// eslint-disable-next-line no-console
12
18
console .log (e )
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <div >Async Component</div >
3
+ </template >
Original file line number Diff line number Diff line change @@ -30,6 +30,13 @@ export default __sfc_main;
30
30
"
31
31
`;
32
32
33
+ exports[`transform fixtures playground/Async.vue 1`] = `
34
+ " <template>
35
+ <div>Async Component</div>
36
+ </template>
37
+ "
38
+ `;
39
+
33
40
exports[`transform fixtures playground/Bar.vue 1`] = `
34
41
" <template>
35
42
<div>Bar</div>
You can’t perform that action at this time.
0 commit comments