From eb9168a81e7cb6a12a1058393f8ae20e0827cc9f Mon Sep 17 00:00:00 2001 From: luoxiao Date: Thu, 21 Nov 2024 11:01:20 +0800 Subject: [PATCH] [fix]ts lint --- src/mapboxgl/layer-highlight/LayerHighlightViewModel.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/mapboxgl/layer-highlight/LayerHighlightViewModel.ts b/src/mapboxgl/layer-highlight/LayerHighlightViewModel.ts index 5d1acbd7..2117d244 100644 --- a/src/mapboxgl/layer-highlight/LayerHighlightViewModel.ts +++ b/src/mapboxgl/layer-highlight/LayerHighlightViewModel.ts @@ -2,6 +2,7 @@ import mapboxgl from 'vue-iclient/static/libs/mapboxgl/mapbox-gl-enhance'; import CircleStyle from 'vue-iclient/src/mapboxgl/_types/CircleStyle'; import LineStyle from 'vue-iclient/src/mapboxgl/_types/LineStyle'; import FillStyle from 'vue-iclient/src/mapboxgl/_types/FillStyle'; +import WebMapViewModel from 'vue-iclient/src/mapboxgl/web-map/WebMapViewModel'; import { getFeatureCenter, getValueCaseInsensitive } from 'vue-iclient/src/common/_utils/util'; import isEqual from 'lodash.isequal'; interface HighlightStyle { @@ -61,11 +62,6 @@ interface PopupFeatureInfo { info: PopupFieldsInfo[]; } -interface MapLoadInfo { - map: mapboxglTypes.Map; - [prop: string]: any; -} - enum DataSelectorMode { SINGLE = 'SINGLE', // 单选 MULTIPLE = 'MULTIPLE', // 多选 @@ -183,6 +179,7 @@ export default class HighlightLayer extends mapboxgl.Evented { private resultFeatures: LayerClickedFeature[] = []; highlightOptions: HighlightLayerOptions; map: mapboxglTypes.Map; + webmap: InstanceType; fire: (type: string, params?: any) => void; constructor(options: HighlightLayerOptions) { @@ -204,7 +201,7 @@ export default class HighlightLayer extends mapboxgl.Evented { }; } - setMap({ map, webmap }: MapLoadInfo) { + setMap({ map, webmap }: mapInfoType) { this.map = map; this.webmap = webmap; this.registerMapClick();