Skip to content

Commit 5608548

Browse files
committed
Update cr
1 parent a4e9b8e commit 5608548

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

dist/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,10 @@
774774
var _this$$slots = this.$slots,
775775
header = _this$$slots.header,
776776
footer = _this$$slots.footer;
777-
var padding = this.isHorizontal ? "0px ".concat(this.range.padBehind, "px 0px ").concat(this.range.padFront, "px") : "".concat(this.range.padFront, "px 0px ").concat(this.range.padBehind, "px");
777+
var _this$range = this.range,
778+
padFront = _this$range.padFront,
779+
padBehind = _this$range.padBehind;
780+
var padding = this.isHorizontal ? "0px ".concat(padBehind, "px 0px ").concat(padFront, "px") : "".concat(padFront, "px 0px ").concat(padBehind, "px");
778781
return h(this.rootTag, {
779782
ref: 'root',
780783
on: {

src/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,8 @@ const VirtualList = Vue.component('virtual-list', {
235235
// https://vuejs.org/v2/guide/render-function.html#The-Data-Object-In-Depth
236236
render (h) {
237237
const { header, footer } = this.$slots
238-
const padding = this.isHorizontal
239-
? `0px ${this.range.padBehind}px 0px ${this.range.padFront}px`
240-
: `${this.range.padFront}px 0px ${this.range.padBehind}px`
238+
const { padFront, padBehind } = this.range
239+
const padding = this.isHorizontal ? `0px ${padBehind}px 0px ${padFront}px` : `${padFront}px 0px ${padBehind}px`
241240

242241
return h(this.rootTag, {
243242
ref: 'root',

0 commit comments

Comments
 (0)