Commit 6850c1da89fbe7e1d79be5e580ffc885201c4b2e
1 parent
74624787
Scroll add `height` prop
Showing
2 changed files
with
6 additions
and
1 deletions
Show diff stats
src/components/date-picker/base/date-table.vue
@@ -93,7 +93,7 @@ | @@ -93,7 +93,7 @@ | ||
93 | const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); | 93 | const weekStartDay = Number(this.t('i.datepicker.weekStartDay')); |
94 | const translatedDays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'].map(item => { | 94 | const translatedDays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat'].map(item => { |
95 | return this.t('i.datepicker.weeks.' + item); | 95 | return this.t('i.datepicker.weeks.' + item); |
96 | - }) | 96 | + }); |
97 | const weekDays = translatedDays.splice(weekStartDay, 7 - weekStartDay).concat(translatedDays.splice(0, weekStartDay)); | 97 | const weekDays = translatedDays.splice(weekStartDay, 7 - weekStartDay).concat(translatedDays.splice(0, weekStartDay)); |
98 | return weekDays; | 98 | return weekDays; |
99 | }, | 99 | }, |
src/components/scroll/scroll.vue
@@ -2,6 +2,7 @@ | @@ -2,6 +2,7 @@ | ||
2 | <div :class="wrapClasses" style="touch-action: none;"> | 2 | <div :class="wrapClasses" style="touch-action: none;"> |
3 | <div | 3 | <div |
4 | :class="scrollContainerClasses" | 4 | :class="scrollContainerClasses" |
5 | + :style="{height: height + 'px'}" | ||
5 | @scroll="handleScroll" | 6 | @scroll="handleScroll" |
6 | @wheel="onWheel" | 7 | @wheel="onWheel" |
7 | @touchstart="onPointerDown" | 8 | @touchstart="onPointerDown" |
@@ -35,6 +36,10 @@ | @@ -35,6 +36,10 @@ | ||
35 | mixins: [], | 36 | mixins: [], |
36 | components: {loader}, | 37 | components: {loader}, |
37 | props: { | 38 | props: { |
39 | + height: { | ||
40 | + type: [Number, String], | ||
41 | + default: 300 | ||
42 | + }, | ||
38 | onReachTop: { | 43 | onReachTop: { |
39 | type: Function, | 44 | type: Function, |
40 | default: () => Promise.resolve() | 45 | default: () => Promise.resolve() |