perf: 优化接口类型

This commit is contained in:
xiaoxian521
2022-08-18 18:35:09 +08:00
parent d6a329a63c
commit a983575b6d
7 changed files with 37 additions and 28 deletions

View File

@@ -19,10 +19,6 @@ defineOptions({
name: "Amap"
});
type resultType = {
info: Array<undefined>;
};
let MarkerCluster;
let map: MapConfigureInter;
@@ -96,8 +92,8 @@ onBeforeMount(() => {
// 获取模拟车辆信息
mapJson()
.then((res: resultType) => {
let points: object = res.info.map((v: any) => {
.then(({ info }) => {
let points: object = info.map(v => {
return {
lnglat: [v.lng, v.lat],
...v