干燥机配套车间生产管理系统/云平台前端
baoshiwei
2023-12-11 1b20ab505d771e8d2168ddb8154da5d6aa85919a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<template>
    <div :class="[prefixCls, getLayoutContentMode]" v-loading="getOpenPageLoading && getPageLoading">
        <PageLayout />
        <!-- update-begin-author:zyf date:20211129 for:qiankun 挂载子应用盒子 -->
        <div id="content" class="app-view-box" v-if="openQianKun == 'true'"></div>
        <!-- update-end-author:zyf date:20211129 for: qiankun 挂载子应用盒子-->
    </div>
</template>
<script lang="ts">
    import { defineComponent, onMounted } from 'vue'
    import PageLayout from '/@/layouts/page/index.vue'
    import { useDesign } from '/@/hooks/web/useDesign'
    import { useRootSetting } from '/@/hooks/setting/useRootSetting'
    import { useTransitionSetting } from '/@/hooks/setting/useTransitionSetting'
    import { useContentViewHeight } from './useContentViewHeight'
    // import registerApps from '/@/qiankun';
    import { useGlobSetting } from '/@/hooks/setting'
    export default defineComponent({
        name: 'LayoutContent',
        components: { PageLayout },
        setup() {
            const { prefixCls } = useDesign('layout-content')
            const { getOpenPageLoading } = useTransitionSetting()
            const { getLayoutContentMode, getPageLoading } = useRootSetting()
            const globSetting = useGlobSetting()
            const openQianKun = globSetting.openQianKun
            useContentViewHeight()
            onMounted(() => {
                // //注册openQianKun
                // if (openQianKun == 'true') {
                //   if (!window.qiankunStarted) {
                //     window.qiankunStarted = true;
                //     registerApps();
                //   }
                // }
            })
            return {
                prefixCls,
                openQianKun,
                getOpenPageLoading,
                getLayoutContentMode,
                getPageLoading,
            }
        },
    })
</script>
<style lang="less">
    @prefix-cls: ~'@{namespace}-layout-content';
 
    .@{prefix-cls} {
        position: relative;
        flex: 1 1 auto;
        min-height: 0;
        overflow: scroll;
        &.fixed {
            width: 1200px;
            margin: 0 auto;
        }
 
        &-loading {
            position: absolute;
            top: 200px;
            z-index: @page-loading-z-index;
        }
    }
</style>