This repository was archived by the owner on Mar 8, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +35
-5
lines changed Expand file tree Collapse file tree 3 files changed +35
-5
lines changed Original file line number Diff line number Diff line change @@ -39,9 +39,17 @@ For the following component
3939
4040``` html
4141<template >
42- <table class =" grid" >
43- <!-- -->
44- </table >
42+ <div >
43+ <!-- Use this slot header -->
44+ <slot name =" header" ></slot >
45+
46+ <table class =" grid" >
47+ <!-- -->
48+ </table >
49+
50+ <!-- Use this slot footer -->
51+ <slot name =" footer" ></slot >
52+ </div >
4553</template >
4654
4755<script >
@@ -344,6 +352,14 @@ we are getting this output:
344352 },
345353 "comment" : " /**\n * Success event.\n *\n * @event success\n * @type {object}\n */"
346354 }
355+ },
356+ "slots" : {
357+ "header" : {
358+ "description" : " Use this slot header"
359+ },
360+ "footer" : {
361+ "description" : " Use this slot footer"
362+ }
347363 }
348364}
349365
@@ -416,6 +432,20 @@ this.$emit('success', {
416432})
417433```
418434
435+ ## Slots
436+
437+ ``` html
438+ <template >
439+ <div >
440+ <!-- Use this slot header -->
441+ <slot name =" header" ></slot >
442+
443+ <!-- Use this slot footer -->
444+ <slot name =" footer" ></slot >
445+ </div >
446+ </template >
447+ ```
448+
419449
420450## Change log
421451
Original file line number Diff line number Diff line change 11{
22 "name" : " vue-docgen-api" ,
3- "version" : " 2.1.1 " ,
3+ "version" : " 2.1.2 " ,
44 "description" : " Toolbox to extract information from Vue component files for documentation generation purposes." ,
55 "bugs" : {
66 "url" : " https://github.com/vue-styleguidist/vue-docgen-api/issues"
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ let docButton;
99
1010describe ( 'tests grid' , ( ) => {
1111 docGrid = api . parse ( grid ) ;
12+ console . log ( JSON . stringify ( docGrid , null , 2 ) )
1213
1314 it ( 'should return an object' , ( ) => {
1415 expect ( docGrid ) . to . be . an ( 'object' )
@@ -230,7 +231,6 @@ describe('tests button', () => {
230231
231232describe ( 'test example vuex' , ( ) => {
232233 const docVuex = api . parse ( exampleVuex ) ;
233- console . log ( JSON . stringify ( docVuex , null , 2 ) )
234234
235235 it ( 'should return an object' , ( ) => {
236236 expect ( docVuex ) . to . be . an ( 'object' )
You can’t perform that action at this time.
0 commit comments