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)))
|
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 = () => {
|
const handleClose = () => {
|
||||||
remember()
|
remember()
|
||||||
|
|||||||
@ -181,6 +181,7 @@
|
|||||||
</el-container>
|
</el-container>
|
||||||
|
|
||||||
<TestRun
|
<TestRun
|
||||||
|
v-if="isOpen"
|
||||||
:drawer="isOpen"
|
:drawer="isOpen"
|
||||||
@close="isOpen = false"
|
@close="isOpen = false"
|
||||||
@changeState="changeState"
|
@changeState="changeState"
|
||||||
@ -364,7 +365,7 @@
|
|||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<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 { MarkerType, VueFlow, useVueFlow } from "@vue-flow/core";
|
||||||
import { v4 as uuid } from "uuid";
|
import { v4 as uuid } from "uuid";
|
||||||
import { Background } from "@vue-flow/background";
|
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 FlowEdge from "./vue-flow/FlowEdge.vue";
|
||||||
import { createFlowFacade } from "./vue-flow/adapter";
|
import { createFlowFacade } from "./vue-flow/adapter";
|
||||||
import { useFlowEvents } from "./composables/useFlowEvents";
|
import { useFlowEvents } from "./composables/useFlowEvents";
|
||||||
import TestRun from "./components/TestRun.vue";
|
const TestRun = defineAsyncComponent(() => import("./components/TestRun.vue"));
|
||||||
import ParamsDrawer from "./components/ParamsDrawer.vue";
|
const ParamsDrawer = defineAsyncComponent(() => import("./components/ParamsDrawer.vue"));
|
||||||
import Aside from "./components/Aside.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 { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import { useFlowStore } from "@/store/modules/flow";
|
import { useFlowStore } from "@/store/modules/flow";
|
||||||
import { emitter } from "@/utils/eventBus";
|
import { emitter } from "@/utils/eventBus";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user