Skip to content

Commit

Permalink
Fixed extra-props error
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbc committed Apr 22, 2020
1 parent 125967a commit 2874403
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
20 changes: 11 additions & 9 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* vue-virtual-scroll-list v2.1.0
* vue-virtual-scroll-list v2.1.1
* open source under the MIT license
* https://github.com/tangbc/vue-virtual-scroll-list#readme
*/
Expand Down Expand Up @@ -534,14 +534,15 @@
mixins: [Wrapper],
props: ItemProps,
render: function render(h) {
var component = this.component,
_this$itemProps = this.itemProps,
itemProps = _this$itemProps === void 0 ? {} : _this$itemProps;
itemProps.source = this.source;
return h(this.tag, {
var tag = this.tag,
component = this.component,
_this$extraProps = this.extraProps,
extraProps = _this$extraProps === void 0 ? {} : _this$extraProps;
extraProps.source = this.source;
return h(tag, {
role: 'item'
}, [h(component, {
props: itemProps
props: extraProps
})]);
}
}); // wrapping for slot
Expand All @@ -550,8 +551,9 @@
mixins: [Wrapper],
props: SlotProps,
render: function render(h) {
var uniqueKey = this.uniqueKey;
return h(this.tag, {
var tag = this.tag,
uniqueKey = this.uniqueKey;
return h(tag, {
attrs: {
role: uniqueKey
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-virtual-scroll-list",
"version": "2.1.0",
"version": "2.1.1",
"description": "A vue component support big amount data list with high scroll performance.",
"main": "dist/index.js",
"files": [
Expand Down
12 changes: 6 additions & 6 deletions src/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ export const Item = Vue.component('virtual-list-item', {
props: ItemProps,

render (h) {
const { component, itemProps = {} } = this
itemProps.source = this.source
const { tag, component, extraProps = {} } = this
extraProps.source = this.source

return h(this.tag, {
return h(tag, {
role: 'item'
}, [h(component, {
props: itemProps
props: extraProps
})])
}
})
Expand All @@ -73,9 +73,9 @@ export const Slot = Vue.component('virtual-list-slot', {
props: SlotProps,

render (h) {
const { uniqueKey } = this
const { tag, uniqueKey } = this

return h(this.tag, {
return h(tag, {
attrs: {
role: uniqueKey
}
Expand Down

0 comments on commit 2874403

Please sign in to comment.