Skip to content
This repository was archived by the owner on Mar 8, 2019. It is now read-only.

Commit ded6f3c

Browse files
committed
2.1.2
1 parent c2955b8 commit ded6f3c

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff 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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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"

tests/parse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ let docButton;
99

1010
describe('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

231232
describe('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')

0 commit comments

Comments
 (0)