Skip to content

Commit 5c8f5f2

Browse files
authored
Update index.js
change $scopedSlots.default to $scopedSlots.item
1 parent d592a2e commit 5c8f5f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@
508508
const slots = this.$slots.default || []
509509

510510
// item-mode shoud judge from items prop.
511-
if (this.item || this.$scopedSlots.default) {
511+
if (this.item || this.$scopedSlots.item) {
512512
delta.total = this.itemcount
513513
if (delta.keeps > delta.total) {
514514
delta.end = delta.total - 1
@@ -544,8 +544,8 @@
544544
const renders = []
545545
for (let i = delta.start; i < delta.total && i <= Math.ceil(delta.end); i++) {
546546
let slot = null
547-
if (this.$scopedSlots.default) {
548-
slot = this.$scopedSlots.default(i)
547+
if (this.$scopedSlots.item) {
548+
slot = this.$scopedSlots.item(i)
549549
} else if (this.item) {
550550
slot = h(this.item, this.itemprops(i))
551551
} else {

0 commit comments

Comments
 (0)