Skip to content

Commit

Permalink
fix: 🐛清空数据异常
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyjone committed May 24, 2023
1 parent 0ee9a56 commit 2506e97
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/composables/useData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import type rootProps from '@/components/root/rootProps';
import Variables from '@/constants/vars';
import type RowItem from '@/models/data/row';
import { useStore } from '@/store';
import { type RowData } from '@/typings/data';
import { isString } from 'lodash';
import { computed, type ExtractPropTypes, toRaw, watch, type Ref } from 'vue';
import useGanttHeader from './useGanttHeader';
Expand Down
4 changes: 2 additions & 2 deletions src/composables/useInView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default () => {
for (let i = inView.length - 1; i >= 0; i--) {
if (
inView[i].hide ||
inView[i].flatIndex < top.value ||
inView[i].flatIndex > bottom.value
inView[i].flatIndex <= top.value ||
inView[i].flatIndex >= bottom.value
) {
inView.splice(i, 1);
}
Expand Down
4 changes: 4 additions & 0 deletions src/models/data/all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ export default class AllData {
* @param options 属性
*/
update(data: any[], options: DataOptions = {}) {
this.__level = 0;
this.start = undefined;
this.end = undefined;
this.originData = data;
this.__diff(this.data, data, options);
this.__flatten();
}
Expand Down

0 comments on commit 2506e97

Please sign in to comment.