1,TS同步加载数据
onMounted(async () => { const { data }: any = await getMapExtScript({ page: 1, page_size: 50 }); if (data && data.list) { scriptData.value = data.list; pagination.value.total = data.total; allData = data.list; } // 拼接地图 if (mapDrawingStore.mapByDblclick && mapDrawingStore.mapByDblclick.identity) { const { data: extData }: any = await getMapTreeExtData(mapDrawingStore.mapByDblclick.identity); if (extData && extData['elevators_group']) { const elevatorsGroup = extData['elevators_group']; mapDrawingStore.$patch((state) => { state.elevatorGroup = elevatorsGroup.elevator; }); } } mapDrawingStore.$patch({ elevatorId: mapDrawingStore.elevatorGroup[0].id }); });
2,
标签:const,0001,data,TS,extData,&&,mapDrawingStore,加载 From: https://www.cnblogs.com/eliteboy/p/18451382