Skip to content

Commit 4882064

Browse files
committed
update slot comment
1 parent 29eba86 commit 4882064

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Diff for: README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -374,15 +374,15 @@ Allow you to refresh ajax content after some event. Let say you have something
374374
## Customizable table head (th) columns
375375
Let say you have a column `description`, you can provide table head template for the description column like so:
376376
```html
377-
<template slot="HEAD_description">
377+
<template v-slot:HEAD_description>
378378
<h1>desc</h1>
379379
</template>
380380
```
381381
382382
## Customizable table footer (th) columns
383383
Let say you have a column `description`, you can provide table footer template for the description column like so:
384384
```html
385-
<template slot="FOOT_description">
385+
<template v-slot:FOOT_description>
386386
<h1>desc</h1>
387387
</template>
388388
```
@@ -432,15 +432,12 @@ window.open(url)
432432
Take a look at example app, you can template:
433433
```
434434
<template
435-
slot="address2"
436-
slot-scope="ctx"
435+
v-slot:address2="ctx"
437436
>
438437
<span>{{ ctx.data.city }}, {{ ctx.comp.formatCode(ctx.data.zipcode) }}</span>
439438
</template>
440439
```
441440
442-
- `slot` is the field/column name
443-
- `slot-scope` define the context object as `ctx` in this example
444441
- The context object will have the following properties
445442
1. `data` the column value, in this case is `address` property which is an object with sub-properties (street, suite, city, zipcode, geo, etc...)
446443
2. `type` the jQuery DataTables rendering type, usually `display`

0 commit comments

Comments
 (0)