File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
app-backend-vue3/src/components Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,15 @@ export class ComponentWalker {
145
145
hasChildren : ! ! children . length ,
146
146
children : [ ] ,
147
147
isFragment : isFragment ( instance ) ,
148
- tags : [ ] ,
148
+ tags : typeof instance . type !== 'function'
149
+ ? [ ]
150
+ : [
151
+ {
152
+ label : 'functional' ,
153
+ textColor : 0x555555 ,
154
+ backgroundColor : 0xeeeeee ,
155
+ } ,
156
+ ] ,
149
157
}
150
158
151
159
// capture children
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import Ghost from './Ghost.vue'
13
13
import Other from ' ./Other.vue'
14
14
import SetupRender from ' ./SetupRender.js'
15
15
import Form from ' ./Form.vue'
16
+ import Functional from ' ./Functional.vue'
16
17
import Heavy from ' ./Heavy.vue'
17
18
import Mixins from ' ./Mixins.vue'
18
19
import Animation from ' ./Animation.vue'
@@ -42,6 +43,7 @@ export default {
42
43
Other,
43
44
SetupRender,
44
45
Form,
46
+ Functional,
45
47
Heavy,
46
48
Mixins,
47
49
Animation,
@@ -104,6 +106,7 @@ export default {
104
106
<Other />
105
107
<SetupRender />
106
108
<Form />
109
+ <Functional msg =" I am functional" />
107
110
<Mixins />
108
111
<SetupScript />
109
112
<SetupDataLike />
Original file line number Diff line number Diff line change
1
+ <script >
2
+ import { h } from ' vue'
3
+
4
+ const Functional = (props , context ) => {
5
+ return h (' div' , context .attrs , props .msg )
6
+ }
7
+ Functional .props = {
8
+ msg: {
9
+ type: String ,
10
+ },
11
+ }
12
+
13
+ export default Functional
14
+ </script >
You can’t perform that action at this time.
0 commit comments