Skip to content

Commit 84363bf

Browse files
committed
chore(dev): SetupRender component
1 parent ac2b743 commit 84363bf

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

packages/shell-dev-vue3/src/App.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Condition from './Condition.vue'
1111
import VModelExample from './VModelExample.vue'
1212
import Ghost from './Ghost.vue'
1313
import Other from './Other.vue'
14+
import SetupRender from './SetupRender.js'
1415
1516
export default {
1617
name: 'MyApp',
@@ -27,7 +28,8 @@ export default {
2728
Condition,
2829
VModelExample,
2930
Ghost,
30-
Other
31+
Other,
32+
SetupRender
3133
},
3234
3335
data () {
@@ -59,6 +61,7 @@ export default {
5961
<VModelExample />
6062
<Ghost />
6163
<Other />
64+
<SetupRender />
6265

6366
<nav>
6467
<router-link to="/p1">

packages/shell-dev-vue3/src/AsyncSetup.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
<template>
2-
{{ message }}
2+
<div>
3+
Async setup:<br>
4+
<pre>{{ message }}</pre>
5+
</div>
36
</template>
47

58
<script>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { defineComponent, reactive, h } from 'vue'
2+
3+
export default defineComponent({
4+
name: 'SetupRender',
5+
6+
setup () {
7+
const state = reactive({
8+
name: 'Foo bar'
9+
})
10+
11+
return () => {
12+
return h('h1', state.name)
13+
}
14+
}
15+
})

0 commit comments

Comments
 (0)