Commit 4f0f09aafc8b0de7c69bfd118d2c6c0368df1ab0
Committed by
GitHub
1 parent
e970884b
Update table.vue
Showing
1 changed file
with
2 additions
and
11 deletions
Show diff stats
src/components/table/table.vue
| @@ -12,7 +12,6 @@ | @@ -12,7 +12,6 @@ | ||
| 12 | :data="rebuildData"></table-head> | 12 | :data="rebuildData"></table-head> |
| 13 | </div> | 13 | </div> |
| 14 | <div :class="[prefixCls + '-body']" :style="bodyStyle" ref="body" @scroll="handleBodyScroll" | 14 | <div :class="[prefixCls + '-body']" :style="bodyStyle" ref="body" @scroll="handleBodyScroll" |
| 15 | - @mousewheel="handleFixedMousewheel" @DOMMouseScroll="handleFixedMousewheel" | ||
| 16 | v-show="!((!!localeNoDataText && (!data || data.length === 0)) || (!!localeNoFilteredDataText && (!rebuildData || rebuildData.length === 0)))"> | 15 | v-show="!((!!localeNoDataText && (!data || data.length === 0)) || (!!localeNoFilteredDataText && (!rebuildData || rebuildData.length === 0)))"> |
| 17 | <table-body | 16 | <table-body |
| 18 | ref="tbody" | 17 | ref="tbody" |
| @@ -49,8 +48,7 @@ | @@ -49,8 +48,7 @@ | ||
| 49 | :data="rebuildData"></table-head> | 48 | :data="rebuildData"></table-head> |
| 50 | </div> | 49 | </div> |
| 51 | <div :class="[prefixCls + '-fixed-body']" :style="fixedBodyStyle" ref="fixedBody" | 50 | <div :class="[prefixCls + '-fixed-body']" :style="fixedBodyStyle" ref="fixedBody" |
| 52 | - @mousewheel="handleFixedMousewheel" @DOMMouseScroll="handleFixedMousewheel" | ||
| 53 | - @touchmove="handleFixedTouchmove"> | 51 | + @mousewheel="handleFixedMousewheel" @DOMMouseScroll="handleFixedMousewheel"> |
| 54 | <table-body | 52 | <table-body |
| 55 | fixed="left" | 53 | fixed="left" |
| 56 | :prefix-cls="prefixCls" | 54 | :prefix-cls="prefixCls" |
| @@ -73,8 +71,7 @@ | @@ -73,8 +71,7 @@ | ||
| 73 | :data="rebuildData"></table-head> | 71 | :data="rebuildData"></table-head> |
| 74 | </div> | 72 | </div> |
| 75 | <div :class="[prefixCls + '-fixed-body']" :style="fixedBodyStyle" ref="fixedRightBody" | 73 | <div :class="[prefixCls + '-fixed-body']" :style="fixedBodyStyle" ref="fixedRightBody" |
| 76 | - @mousewheel="handleFixedMousewheel" @DOMMouseScroll="handleFixedMousewheel" | ||
| 77 | - @touchmove="handleFixedTouchmove"> | 74 | + @mousewheel="handleFixedMousewheel" @DOMMouseScroll="handleFixedMousewheel"> |
| 78 | <table-body | 75 | <table-body |
| 79 | fixed="right" | 76 | fixed="right" |
| 80 | :prefix-cls="prefixCls" | 77 | :prefix-cls="prefixCls" |
| @@ -544,12 +541,6 @@ | @@ -544,12 +541,6 @@ | ||
| 544 | if (this.isRightFixed) this.$refs.fixedRightBody.scrollTop = event.target.scrollTop; | 541 | if (this.isRightFixed) this.$refs.fixedRightBody.scrollTop = event.target.scrollTop; |
| 545 | this.hideColumnFilter(); | 542 | this.hideColumnFilter(); |
| 546 | }, | 543 | }, |
| 547 | - handleFixedTouchmove(event){ | ||
| 548 | - //console.log(event); | ||
| 549 | - if(event.touches && event.touches.length && event.touches.length===1){ | ||
| 550 | - //const body = this.$refs.body; | ||
| 551 | - } | ||
| 552 | - }, | ||
| 553 | handleFixedMousewheel(event) { | 544 | handleFixedMousewheel(event) { |
| 554 | let deltaY = event.deltaY; | 545 | let deltaY = event.deltaY; |
| 555 | if(!deltaY && event.detail){ | 546 | if(!deltaY && event.detail){ |