Skip to content

Commit fe50aba

Browse files
committed
Change to itemScopedSlots
1 parent b0b0411 commit fe50aba

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ More usages or getting start you can refer to these clearly [examples](https://g
318318
<td>For using using footer slot, footer slot wrapper element inline style.</td>
319319
</tr>
320320
<tr>
321-
<td><code>scoped-slots</code></td>
321+
<td><code>item-scoped-slots</code></td>
322322
<td>Object</td>
323323
<td>{}</td>
324-
<td>$scopedSlots for item component</td>
324+
<td>The <code>$scopedSlots</code> for item component</td>
325325
</tr>
326326
</table>
327327
</details>

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ const VirtualList = Vue.component('virtual-list', {
263263
getRenderSlots (h) {
264264
const slots = []
265265
const { start, end } = this.range
266-
const { dataSources, dataKey, itemClass, itemTag, itemStyle, isHorizontal, extraProps, dataComponent, scopedSlots } = this
266+
const { dataSources, dataKey, itemClass, itemTag, itemStyle, isHorizontal, extraProps, dataComponent, itemScopedSlots } = this
267267
for (let index = start; index <= end; index++) {
268268
const dataSource = dataSources[index]
269269
if (dataSource) {
@@ -278,7 +278,7 @@ const VirtualList = Vue.component('virtual-list', {
278278
source: dataSource,
279279
extraProps: extraProps,
280280
component: dataComponent,
281-
scopedSlots: scopedSlots
281+
scopedSlots: itemScopedSlots
282282
},
283283
style: itemStyle,
284284
class: `${itemClass}${this.itemClassAdd ? ' ' + this.itemClassAdd(index) : ''}`

src/props.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const VirtualProps = {
103103
footerStyle: {
104104
type: Object
105105
},
106-
scopedSlots: {
106+
itemScopedSlots: {
107107
type: Object
108108
}
109109
}

0 commit comments

Comments
 (0)