From e14fbd622d1076cba5f34bd4fa29530af4f70261 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Wed, 24 Jul 2024 22:43:46 +0800 Subject: [PATCH] fix: set control highlight limit component type --- .../core/draw/control/interactive/ControlSearch.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/editor/core/draw/control/interactive/ControlSearch.ts b/src/editor/core/draw/control/interactive/ControlSearch.ts index 9d57287..f7090c8 100644 --- a/src/editor/core/draw/control/interactive/ControlSearch.ts +++ b/src/editor/core/draw/control/interactive/ControlSearch.ts @@ -1,3 +1,5 @@ +import { ZERO } from '../../../../dataset/constant/Common' +import { ControlComponent } from '../../../../dataset/enum/Control' import { ElementType } from '../../../../dataset/enum/Element' import { DeepRequired } from '../../../../interface/Common' import { @@ -85,7 +87,13 @@ export class ControlSearch { } i = newEndIndex // 高亮信息 - const controlElementList = elementList.slice(startIndex, newEndIndex) + const controlElementList = elementList + .slice(startIndex, newEndIndex) + .map(element => + element.controlComponent === ControlComponent.VALUE + ? element + : { value: ZERO } + ) const highlight = this.highlightList[highlightIndex] const { ruleList } = highlight for (let r = 0; r < ruleList.length; r++) {