Skip to content

Commit 2874403

Browse files
committed
Fixed extra-props error
1 parent 125967a commit 2874403

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

dist/index.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-virtual-scroll-list v2.1.0
2+
* vue-virtual-scroll-list v2.1.1
33
* open source under the MIT license
44
* https://github.com/tangbc/vue-virtual-scroll-list#readme
55
*/
@@ -534,14 +534,15 @@
534534
mixins: [Wrapper],
535535
props: ItemProps,
536536
render: function render(h) {
537-
var component = this.component,
538-
_this$itemProps = this.itemProps,
539-
itemProps = _this$itemProps === void 0 ? {} : _this$itemProps;
540-
itemProps.source = this.source;
541-
return h(this.tag, {
537+
var tag = this.tag,
538+
component = this.component,
539+
_this$extraProps = this.extraProps,
540+
extraProps = _this$extraProps === void 0 ? {} : _this$extraProps;
541+
extraProps.source = this.source;
542+
return h(tag, {
542543
role: 'item'
543544
}, [h(component, {
544-
props: itemProps
545+
props: extraProps
545546
})]);
546547
}
547548
}); // wrapping for slot
@@ -550,8 +551,9 @@
550551
mixins: [Wrapper],
551552
props: SlotProps,
552553
render: function render(h) {
553-
var uniqueKey = this.uniqueKey;
554-
return h(this.tag, {
554+
var tag = this.tag,
555+
uniqueKey = this.uniqueKey;
556+
return h(tag, {
555557
attrs: {
556558
role: uniqueKey
557559
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-virtual-scroll-list",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "A vue component support big amount data list with high scroll performance.",
55
"main": "dist/index.js",
66
"files": [

src/item.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ export const Item = Vue.component('virtual-list-item', {
5555
props: ItemProps,
5656

5757
render (h) {
58-
const { component, itemProps = {} } = this
59-
itemProps.source = this.source
58+
const { tag, component, extraProps = {} } = this
59+
extraProps.source = this.source
6060

61-
return h(this.tag, {
61+
return h(tag, {
6262
role: 'item'
6363
}, [h(component, {
64-
props: itemProps
64+
props: extraProps
6565
})])
6666
}
6767
})
@@ -73,9 +73,9 @@ export const Slot = Vue.component('virtual-list-slot', {
7373
props: SlotProps,
7474

7575
render (h) {
76-
const { uniqueKey } = this
76+
const { tag, uniqueKey } = this
7777

78-
return h(this.tag, {
78+
return h(tag, {
7979
attrs: {
8080
role: uniqueKey
8181
}

0 commit comments

Comments
 (0)