update Table

This commit is contained in:
梁灏 2017-07-10 13:49:26 +08:00
parent ce45917bde
commit f00b534390

View file

@ -88,6 +88,7 @@
import tableHead from './table-head.vue';
import tableBody from './table-body.vue';
import { oneOf, getStyle, deepCopy, getScrollBarSize } from '../../utils/assist';
import { on, off } from '../../utils/dom';
import Csv from '../../utils/csv';
import ExportCsv from './export-csv';
import Locale from '../../mixins/locale';
@ -691,7 +692,8 @@
this.handleResize();
this.fixedHeader();
this.$nextTick(() => this.ready = true);
window.addEventListener('resize', this.handleResize, false);
// window.addEventListener('resize', this.handleResize, false);
on(window, 'resize', this.handleResize);
this.$on('on-visible-change', (val) => {
if (val) {
this.handleResize();
@ -700,7 +702,8 @@
});
},
beforeDestroy () {
window.removeEventListener('resize', this.handleResize, false);
// window.removeEventListener('resize', this.handleResize, false);
off(window, 'resize', this.handleResize);
},
watch: {
data: {