File tree Expand file tree Collapse file tree 2 files changed +51
-24
lines changed
playground/src/components Expand file tree Collapse file tree 2 files changed +51
-24
lines changed Original file line number Diff line number Diff line change 11<template >
22 <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 >
56 </div >
67</template >
78
@@ -14,6 +15,7 @@ defineEmits<{
1415
1516defineSlots <{
1617 default: (props : { id: string }) => any
18+ top: (props : { foo: number }) => any
1719 bottom: (props : { foo: number }) => any
1820}>()
1921 </script >
Original file line number Diff line number Diff line change 11id : v-define-slots default
22language : 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$
313rule :
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
1224fix :
1325 slots.default
1426
1527---
1628
1729id : v-define-slots name
1830language : 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
1946rule :
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
3358fix :
34- slots.$V
59+ slots.$A
3560
3661---
3762
You can’t perform that action at this time.
0 commit comments