mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-09 13:53:38 +08:00
perf: 优化接口类型
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user