File tree 2 files changed +51
-24
lines changed
playground/src/components
2 files changed +51
-24
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div @click =" ()=> $emit('update', 2)" >
3
- <slot :id =" `${id}`" />
4
- <slot name =" bottom" v-bind =" { foo: id }" />
3
+ <slot name =" top" v-bind =" { foo: id }" />
4
+ <slot :id =" `${id}`" >{{ id }}</slot >
5
+ <slot name =" bottom" v-bind =" { foo: id }" >bottom</slot >
5
6
</div >
6
7
</template >
7
8
@@ -14,6 +15,7 @@ defineEmits<{
14
15
15
16
defineSlots <{
16
17
default: (props : { id: string }) => any
18
+ top: (props : { foo: number }) => any
17
19
bottom: (props : { foo: number }) => any
18
20
}>()
19
21
</script >
Original file line number Diff line number Diff line change 1
1
id : v-define-slots default
2
2
language : html
3
+ utils :
4
+ is-default-slot :
5
+ kind : tag_name
6
+ regex : ^slot$
7
+ precedes :
8
+ kind : attribute
9
+ not :
10
+ has :
11
+ kind : attribute_name
12
+ regex : ^name$
3
13
rule :
4
- kind : tag_name
5
- regex : ^slot$
6
- precedes :
7
- kind : attribute
8
- not :
9
- has :
10
- kind : attribute_name
11
- regex : ^name$
14
+ any :
15
+ - matches : is-default-slot
16
+ - kind : tag_name
17
+ inside :
18
+ kind : end_tag
19
+ follows :
20
+ kind : start_tag
21
+ stopBy : end
22
+ has :
23
+ matches : is-default-slot
12
24
fix :
13
25
slots.default
14
26
15
27
---
16
28
17
29
id : v-define-slots name
18
30
language : html
31
+ utils :
32
+ is-slot :
33
+ kind : tag_name
34
+ regex : ^slot$
35
+ precedes :
36
+ kind : attribute
37
+ has :
38
+ kind : attribute_name
39
+ regex : ^name$
40
+ precedes :
41
+ kind : quoted_attribute_value
42
+ has :
43
+ kind : attribute_value
44
+ pattern : $A
45
+ stopBy : end
19
46
rule :
20
- kind : tag_name
21
- regex : ^slot$
22
- precedes :
23
- kind : attribute
24
- has :
25
- kind : attribute_name
26
- regex : ^name$
27
- precedes :
28
- kind : quoted_attribute_value
29
- has :
30
- kind : attribute_value
31
- pattern : $V
32
- stopBy : end
47
+ any :
48
+ - matches : is-slot
49
+ - kind : tag_name
50
+ regex : slot
51
+ inside :
52
+ kind : end_tag
53
+ follows :
54
+ kind : start_tag
55
+ stopBy : end
56
+ has :
57
+ matches : is-slot
33
58
fix :
34
- slots.$V
59
+ slots.$A
35
60
36
61
---
37
62
You can’t perform that action at this time.
0 commit comments