fix : 修复数据loading加载

This commit is contained in:
2024-03-05 21:47:53 +08:00
parent c242691a65
commit 204d687336
8 changed files with 109 additions and 47 deletions

View File

@@ -75,7 +75,7 @@
<script setup>
import TunnelScene from "@/components/content/tunnelScene/TunnelScene.vue";
import {editTunnel, getTunnelDetail} from "@/api/tunnelManage";
import {ElMessage} from "element-plus";
import {ElLoading, ElMessage} from "element-plus";
import {initSceneData} from "@/api/tunnelScene";
import TunnelTitle from "@/components/tunnelTitle/index.vue";
@@ -97,8 +97,14 @@ const form = ref({
remarks: "",
});
const getTunnel = () => {
const loading = ElLoading.service({
lock: true,
text: '正在加载系统资源',
background: 'rgba(0, 0, 0, 0.7)',
})
getTunnelDetail(tunnelId).then((res) => {
if (res?.code === 1000) {
loading.close()
form.value = res.data;
}
});