Skip to content

Commit d0c7c0b

Browse files
author
undefined
committed
fix: table expanded error #4223
1 parent fb94e7c commit d0c7c0b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

components/table/Table.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import defaultLocale from '../locale-provider/default';
2020
import warning from '../_util/warning';
2121
import scrollTo from '../_util/scrollTo';
2222
import TransButton from '../_util/transButton';
23-
import Vue from 'vue';
2423

2524
function noop() {}
2625

@@ -143,7 +142,7 @@ export default {
143142
);
144143
this.CheckboxPropsCache = {};
145144

146-
this.store = Vue.observable({
145+
this.store = this.$root.constructor.observable({
147146
selectedRowKeys: getRowSelection(this.$props).selectedRowKeys || [],
148147
selectionDirty: false,
149148
});

components/vc-table/src/Table.jsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import BodyTable from './BodyTable';
1313
import ExpandableTable from './ExpandableTable';
1414
import { initDefaultProps, getOptionProps, getListeners } from '../../_util/props-util';
1515
import BaseMixin from '../../_util/BaseMixin';
16-
import Vue from 'vue';
1716

1817
export default {
1918
name: 'Table',
@@ -88,7 +87,7 @@ export default {
8887
),
8988
data() {
9089
this.preData = [...this.data];
91-
this.store = Vue.observable({
90+
this.store = this.$root.constructor.observable({
9291
currentHoverKey: null,
9392
fixedColumnsHeadRowsHeight: [],
9493
fixedColumnsBodyRowsHeight: {},

0 commit comments

Comments
 (0)