Skip to content

Commit

Permalink
Documented offset and slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed May 3, 2019
1 parent 97a8bf8 commit 7008e6a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ export default {
mixins: [
Subslot.define({
// Use a string filter
cardHeader: '@CardHeader:1',
cardHeader: '@CardHeader:1', // Limit 1
cardHeader: '@CardHeader[3:2]', // Offset 3, Limit 2
// Or an object filter
cardHeader: {
Expand Down Expand Up @@ -158,10 +159,19 @@ Pass in an array
<subslot :element="[ChildComponentA, '@ChildComponentB', 'div']" />
```

### Offset the number of returned elements
```html
<subslot
element="ChildComponent"
offset="1"
/>
```

### Limit the number of returned elements
```html
<subslot
element="ChildComponent"
offset="1"
limit="1"
/>
```
Expand Down

0 comments on commit 7008e6a

Please sign in to comment.