forked from SmartBench/CMVR-IOT-UI
feat: 优化页面加载速度
This commit is contained in:
parent
d8e1168020
commit
8c2ed421cc
@ -209,7 +209,7 @@ const initialize = async () => {
|
||||
await Promise.all(roles.value.filter((role) => getMember(role).robotId).map((role) => loadRoleDevices(role)))
|
||||
}
|
||||
|
||||
watch(() => props.drawer, (open) => { if (open) initialize() })
|
||||
watch(() => props.drawer, (open) => { if (open) initialize() }, { immediate: true })
|
||||
|
||||
const handleClose = () => {
|
||||
remember()
|
||||
|
||||
@ -181,6 +181,7 @@
|
||||
</el-container>
|
||||
|
||||
<TestRun
|
||||
v-if="isOpen"
|
||||
:drawer="isOpen"
|
||||
@close="isOpen = false"
|
||||
@changeState="changeState"
|
||||
@ -364,7 +365,7 @@
|
||||
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, reactive, ref, watch, onMounted, onUnmounted, nextTick } from "vue";
|
||||
import { computed, defineAsyncComponent, reactive, ref, watch, onMounted, onUnmounted, nextTick } from "vue";
|
||||
import { MarkerType, VueFlow, useVueFlow } from "@vue-flow/core";
|
||||
import { v4 as uuid } from "uuid";
|
||||
import { Background } from "@vue-flow/background";
|
||||
@ -376,10 +377,10 @@ import FlowNode from "./vue-flow/FlowNode.vue";
|
||||
import FlowEdge from "./vue-flow/FlowEdge.vue";
|
||||
import { createFlowFacade } from "./vue-flow/adapter";
|
||||
import { useFlowEvents } from "./composables/useFlowEvents";
|
||||
import TestRun from "./components/TestRun.vue";
|
||||
import ParamsDrawer from "./components/ParamsDrawer.vue";
|
||||
const TestRun = defineAsyncComponent(() => import("./components/TestRun.vue"));
|
||||
const ParamsDrawer = defineAsyncComponent(() => import("./components/ParamsDrawer.vue"));
|
||||
import Aside from "./components/Aside.vue";
|
||||
import ActionQueueSingleRun from "./components/ActionQueueSingleRun.vue";
|
||||
const ActionQueueSingleRun = defineAsyncComponent(() => import("./components/ActionQueueSingleRun.vue"));
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import { useFlowStore } from "@/store/modules/flow";
|
||||
import { emitter } from "@/utils/eventBus";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user