智慧工地前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
smart-factory/src/layout/index.vue

32 lines
867 B

2 weeks ago
<template>
<div v-if="elementPlusLoaded">
<template v-if="barType == 'top'">
<UpDown></UpDown>
</template>
<template v-else>
<LeftRight></LeftRight>
</template>
</div>
</template>
<script setup>
import useSettingsStore from '@/store/modules/settings'
import LeftRight from './components/LeftRight.vue'
import UpDown from './components/UpDown.vue'
import useAppStore from '@/store/modules/app'
const elementPlusLoaded = ref(false);
onMounted(async () => {
const { proxy } = getCurrentInstance();
await proxy.$register();
// 完成异步加载,设置 elementPlusLoaded 为 true
elementPlusLoaded.value = true;
useAppStore().setElLoading(true);
});
const settingsStore = useSettingsStore()
const barType = computed(() => settingsStore.barType);
</script>
<style lang="scss" scoped>
</style>