异步加载

This commit is contained in:
刘旋 2023-04-20 17:15:43 +08:00
parent ddd10699eb
commit ad649a1252
1 changed files with 6 additions and 1 deletions

View File

@ -123,7 +123,7 @@
<span style="line-height: 35px;">Longitude</span>
<el-input placeholder="wait……" style="height:35px;" v-model="state.dislon" readonly="readonly"></el-input>
</el-container>
<Map style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></Map>
<MapPage style="height:350px ; width:100% ;margin-bottom: 10px;" ref="mapRef"></MapPage>
<el-form-item label="Disaster Time">
<el-date-picker v-model="state.edit.disasterTime" type="date" value-format="YYYY-MM-DD"
placeholder="Select date and time" />
@ -172,6 +172,11 @@ const handleClick = (tab, event) => {
state.selectName = tab.props.name;
getTableData();
};
const MapPage = defineAsyncComponent({
loader:() =>import('/@/components/Map.vue'),
delay: 200,
})
const onAllocation = (row) => {
select.value.openDialog(row)
};