Skip to content

Commit 6a5ef21

Browse files
committed
chore: update readme
1 parent 945bab7 commit 6a5ef21

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ and finally:
102102
| Vue Event | Description |
103103
|---|---|
104104
| data | If the `toc` proerty is set to `true`, this event will occur containing any TOC data, if there is any. This is an array of flat data |
105-
| tree | If the `toc` proerty is set to `true`, this event will occur containing any TOC data, if there is any. This is an array of hierarchial data |
106105

107106
Given markdown that looks like this:
108107
```
@@ -114,13 +113,28 @@ Given markdown that looks like this:
114113
The TOC data looks like this:
115114
```
116115
[
117-
{id: 'h2-Heading', title: 'h2 Heading', level: 2},
118-
{id: 'h3-Heading', title: 'h3 Heading', level: 3}
116+
{id: 'h2-Heading', title: 'h2 Heading', level: 2, children: []},
117+
{id: 'h3-Heading', title: 'h3 Heading', level: 3, children: []}
119118
]
120119
```
121120

121+
# QMarkdown Vue Methods
122+
| Vue Method | Description |
123+
|---|---|
124+
| makeTree | Pass into this function the results from the @data to have the data array transformed into a hieracrhial tree. |
125+
126+
The TOC data will be transformed to the following:
127+
```
128+
[
129+
{id: 'h2-Heading', title: 'h2 Heading', level: 2, children: [
130+
{id: 'h3-Heading', title: 'h3 Heading', level: 3, children: []}
131+
]}
132+
133+
]
134+
```
122135

123136
# QMarkdown Vue Slots
124-
| Vue Property | Description |
137+
| Vue Slot | Description |
125138
|---|---|
126139
| default | The default slot - this slot overrides anything that may be passed in via the `src` property. |
140+

0 commit comments

Comments
 (0)