From 2506e97bdd504f82762e0c9569ba620ad91d5d3d Mon Sep 17 00:00:00 2001 From: xpyjs Date: Wed, 24 May 2023 17:45:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=E6=B8=85=E7=A9=BA=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/composables/useData.ts | 1 - src/composables/useInView.ts | 4 ++-- src/models/data/all.ts | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/composables/useData.ts b/src/composables/useData.ts index 25c82c0..99b4a79 100644 --- a/src/composables/useData.ts +++ b/src/composables/useData.ts @@ -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'; diff --git a/src/composables/useInView.ts b/src/composables/useInView.ts index 3b2ff5e..c9bfd23 100644 --- a/src/composables/useInView.ts +++ b/src/composables/useInView.ts @@ -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); } diff --git a/src/models/data/all.ts b/src/models/data/all.ts index 253bf3f..21521aa 100644 --- a/src/models/data/all.ts +++ b/src/models/data/all.ts @@ -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(); }