fix: table expanded error #4223

pull/4280/head
undefined 2021-06-26 20:35:53 +08:00
parent fb94e7c119
commit d0c7c0b128
2 changed files with 2 additions and 4 deletions

View File

@ -20,7 +20,6 @@ import defaultLocale from '../locale-provider/default';
import warning from '../_util/warning'; import warning from '../_util/warning';
import scrollTo from '../_util/scrollTo'; import scrollTo from '../_util/scrollTo';
import TransButton from '../_util/transButton'; import TransButton from '../_util/transButton';
import Vue from 'vue';
function noop() {} function noop() {}
@ -143,7 +142,7 @@ export default {
); );
this.CheckboxPropsCache = {}; this.CheckboxPropsCache = {};
this.store = Vue.observable({ this.store = this.$root.constructor.observable({
selectedRowKeys: getRowSelection(this.$props).selectedRowKeys || [], selectedRowKeys: getRowSelection(this.$props).selectedRowKeys || [],
selectionDirty: false, selectionDirty: false,
}); });

View File

@ -13,7 +13,6 @@ import BodyTable from './BodyTable';
import ExpandableTable from './ExpandableTable'; import ExpandableTable from './ExpandableTable';
import { initDefaultProps, getOptionProps, getListeners } from '../../_util/props-util'; import { initDefaultProps, getOptionProps, getListeners } from '../../_util/props-util';
import BaseMixin from '../../_util/BaseMixin'; import BaseMixin from '../../_util/BaseMixin';
import Vue from 'vue';
export default { export default {
name: 'Table', name: 'Table',
@ -88,7 +87,7 @@ export default {
), ),
data() { data() {
this.preData = [...this.data]; this.preData = [...this.data];
this.store = Vue.observable({ this.store = this.$root.constructor.observable({
currentHoverKey: null, currentHoverKey: null,
fixedColumnsHeadRowsHeight: [], fixedColumnsHeadRowsHeight: [],
fixedColumnsBodyRowsHeight: {}, fixedColumnsBodyRowsHeight: {},