From 54849757852f6ab40eb17afbd03d1d839b60a38d Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 13 Nov 2023 17:09:15 +0800
Subject: [PATCH] 重复定时和连续执行
---
src/store/map.ts | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/store/map.ts b/src/store/map.ts
index 0bea697..e20f151 100644
--- a/src/store/map.ts
+++ b/src/store/map.ts
@@ -1,4 +1,8 @@
import { MutationTree } from 'vuex'
+interface longitude {
+ longitude:number
+ latitude: number
+}
const state = () => ({
// 项目中心点设置
centerConfig: {
@@ -7,13 +11,9 @@
latitude: null as number | null,
longitude: null as number | null,
},
- // 所有项目中心点
- pointList: [],
+ // 项目列表中在地图中展示中心点
+ pointList: [] as longitude[] | [],
})
-interface longitude {
- longitude:number
- latitude: number
-}
export type RootStateType = ReturnType<typeof state>
const mutations: MutationTree<RootStateType> = {
// 开启设置地图坐标标识
@@ -24,6 +24,10 @@
SET_CENTER_CONFIG_LATITUDE (state, data:longitude) {
state.centerConfig.longitude = data.longitude
state.centerConfig.latitude = data.latitude
+ },
+ // 设置项目列表中的中心点
+ SET_POINT_LIST (state, data: longitude[]) {
+ state.pointList = data
}
}
export default {
--
Gitblit v1.9.3