Browse Source

fix: table expanded error #4223

pull/4280/head
undefined 3 years ago
parent
commit
d0c7c0b128
  1. 3
      components/table/Table.jsx
  2. 3
      components/vc-table/src/Table.jsx

3
components/table/Table.jsx

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

3
components/vc-table/src/Table.jsx

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

Loading…
Cancel
Save