mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 00:10:25 +08:00 
			
		
		
		
	refactor: 报错代码调整
This commit is contained in:
		@@ -22,7 +22,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
### 介绍
 | 
					### 介绍
 | 
				
			||||||
 | 
					
 | 
				
			||||||
web 版 **linux(终端[终端回放] 文件 脚本 进程 计划任务)、数据库(mysql postgres)、redis(单机 哨兵 集群)、mongo 统一管理操作平台**
 | 
					web 版 **linux(终端[终端回放] 文件 脚本 进程 计划任务)、数据库(mysql postgres 达梦)、redis(单机 哨兵 集群)、mongo 统一管理操作平台**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### 开发语言与主要框架
 | 
					### 开发语言与主要框架
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -215,13 +215,9 @@ watch(
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
);
 | 
					);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
watch(
 | 
					watch(isShowSearch, () => {
 | 
				
			||||||
    () => isShowSearch.value,
 | 
					    calcuTableHeight();
 | 
				
			||||||
    () => {
 | 
					});
 | 
				
			||||||
        console.log('watch show sa');
 | 
					 | 
				
			||||||
        calcuTableHeight();
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
);
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
onMounted(async () => {
 | 
					onMounted(async () => {
 | 
				
			||||||
    calcuTableHeight();
 | 
					    calcuTableHeight();
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,23 +15,15 @@
 | 
				
			|||||||
    </el-container>
 | 
					    </el-container>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts" setup name="layoutColumns">
 | 
				
			||||||
import { computed } from 'vue';
 | 
					import { computed } from 'vue';
 | 
				
			||||||
import Aside from '@/layout/component/aside.vue';
 | 
					import Aside from '@/layout/component/aside.vue';
 | 
				
			||||||
import Header from '@/layout/component/header.vue';
 | 
					import Header from '@/layout/component/header.vue';
 | 
				
			||||||
import Main from '@/layout/component/main.vue';
 | 
					import Main from '@/layout/component/main.vue';
 | 
				
			||||||
import ColumnsAside from '@/layout/component/columnsAside.vue';
 | 
					import ColumnsAside from '@/layout/component/columnsAside.vue';
 | 
				
			||||||
import { useThemeConfig } from '@/store/themeConfig';
 | 
					import { useThemeConfig } from '@/store/themeConfig';
 | 
				
			||||||
export default {
 | 
					
 | 
				
			||||||
    name: 'layoutColumns',
 | 
					const isFixedHeader = computed(() => {
 | 
				
			||||||
    components: { Aside, Header, Main, ColumnsAside },
 | 
					    return useThemeConfig().themeConfig.isFixedHeader;
 | 
				
			||||||
    setup() {
 | 
					});
 | 
				
			||||||
        const isFixedHeader = computed(() => {
 | 
					 | 
				
			||||||
            return useThemeConfig().themeConfig.isFixedHeader;
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        return {
 | 
					 | 
				
			||||||
            isFixedHeader,
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,32 +12,24 @@
 | 
				
			|||||||
    </el-container>
 | 
					    </el-container>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts" setup name="layoutDefaults">
 | 
				
			||||||
import { computed, getCurrentInstance, watch } from 'vue';
 | 
					import { computed, getCurrentInstance, watch } from 'vue';
 | 
				
			||||||
import { useRoute } from 'vue-router';
 | 
					import { useRoute } from 'vue-router';
 | 
				
			||||||
import Aside from '@/layout/component/aside.vue';
 | 
					import Aside from '@/layout/component/aside.vue';
 | 
				
			||||||
import Header from '@/layout/component/header.vue';
 | 
					import Header from '@/layout/component/header.vue';
 | 
				
			||||||
import Main from '@/layout/component/main.vue';
 | 
					import Main from '@/layout/component/main.vue';
 | 
				
			||||||
import { useThemeConfig } from '@/store/themeConfig';
 | 
					import { useThemeConfig } from '@/store/themeConfig';
 | 
				
			||||||
export default {
 | 
					
 | 
				
			||||||
    name: 'layoutDefaults',
 | 
					const { proxy } = getCurrentInstance() as any;
 | 
				
			||||||
    components: { Aside, Header, Main },
 | 
					const route = useRoute();
 | 
				
			||||||
    setup() {
 | 
					const isFixedHeader = computed(() => {
 | 
				
			||||||
        const { proxy } = getCurrentInstance() as any;
 | 
					    return useThemeConfig().themeConfig.isFixedHeader;
 | 
				
			||||||
        const route = useRoute();
 | 
					});
 | 
				
			||||||
        const isFixedHeader = computed(() => {
 | 
					// 监听路由的变化
 | 
				
			||||||
            return useThemeConfig().themeConfig.isFixedHeader;
 | 
					watch(
 | 
				
			||||||
        });
 | 
					    () => route.path,
 | 
				
			||||||
        // 监听路由的变化
 | 
					    () => {
 | 
				
			||||||
        watch(
 | 
					        proxy.$refs.layoutScrollbarRef.wrapRef.scrollTop = 0;
 | 
				
			||||||
            () => route.path,
 | 
					    }
 | 
				
			||||||
            () => {
 | 
					);
 | 
				
			||||||
                proxy.$refs.layoutScrollbarRef.wrapRef.scrollTop = 0;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        );
 | 
					 | 
				
			||||||
        return {
 | 
					 | 
				
			||||||
            isFixedHeader,
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,11 +6,7 @@
 | 
				
			|||||||
    </el-container>
 | 
					    </el-container>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts" setup name="layoutTransverse">
 | 
				
			||||||
import Header from '@/layout/component/header.vue';
 | 
					import Header from '@/layout/component/header.vue';
 | 
				
			||||||
import Main from '@/layout/component/main.vue';
 | 
					import Main from '@/layout/component/main.vue';
 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
    name: 'layoutTransverse',
 | 
					 | 
				
			||||||
    components: { Header, Main },
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,19 +2,19 @@
 | 
				
			|||||||
    <template v-for="val in chils">
 | 
					    <template v-for="val in chils">
 | 
				
			||||||
        <el-sub-menu :index="val.path" :key="val.path" v-if="val.children && val.children.length > 0">
 | 
					        <el-sub-menu :index="val.path" :key="val.path" v-if="val.children && val.children.length > 0">
 | 
				
			||||||
            <template #title>
 | 
					            <template #title>
 | 
				
			||||||
                <SvgIcon :name="val.meta.icon"/>
 | 
					                <SvgIcon :name="val.meta.icon" />
 | 
				
			||||||
                <span>{{ val.meta.title }}</span>
 | 
					                <span>{{ val.meta.title }}</span>
 | 
				
			||||||
            </template>
 | 
					            </template>
 | 
				
			||||||
            <sub-item :chil="val.children" />
 | 
					            <sub-item :chil="val.children" />
 | 
				
			||||||
        </el-sub-menu>
 | 
					        </el-sub-menu>
 | 
				
			||||||
        <el-menu-item :index="val.path" :key="val?.path" v-else>
 | 
					        <el-menu-item :index="val.path" :key="val?.path" v-else>
 | 
				
			||||||
            <template v-if="!val.meta.link || (val.meta.link && val.meta.linkType == 1)">
 | 
					            <template v-if="!val.meta.link || (val.meta.link && val.meta.linkType == 1)">
 | 
				
			||||||
                <SvgIcon :name="val.meta.icon"/>
 | 
					                <SvgIcon :name="val.meta.icon" />
 | 
				
			||||||
                <span>{{ val.meta.title }}</span>
 | 
					                <span>{{ val.meta.title }}</span>
 | 
				
			||||||
            </template>
 | 
					            </template>
 | 
				
			||||||
            <template v-else>
 | 
					            <template v-else>
 | 
				
			||||||
                <a :href="val.meta.link" target="_blank">
 | 
					                <a :href="val.meta.link" target="_blank">
 | 
				
			||||||
                    <SvgIcon :name="val.meta.icon"/>
 | 
					                    <SvgIcon :name="val.meta.icon" />
 | 
				
			||||||
                    {{ val.meta.title }}
 | 
					                    {{ val.meta.title }}
 | 
				
			||||||
                </a>
 | 
					                </a>
 | 
				
			||||||
            </template>
 | 
					            </template>
 | 
				
			||||||
@@ -24,7 +24,6 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
import { computed, defineComponent } from 'vue';
 | 
					import { computed, defineComponent } from 'vue';
 | 
				
			||||||
import SvgIcon from '@/components/svgIcon/index.vue';
 | 
					 | 
				
			||||||
export default defineComponent({
 | 
					export default defineComponent({
 | 
				
			||||||
    name: 'navMenuSubItem',
 | 
					    name: 'navMenuSubItem',
 | 
				
			||||||
    props: {
 | 
					    props: {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,7 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts">
 | 
					<script lang="ts">
 | 
				
			||||||
import { defineComponent, reactive, toRefs, onMounted, onBeforeMount, onUnmounted, nextTick, getCurrentInstance } from 'vue';
 | 
					import { defineComponent, reactive, toRefs, onMounted, onBeforeMount, onUnmounted, nextTick } from 'vue';
 | 
				
			||||||
import { useRoute } from 'vue-router';
 | 
					import { useRoute } from 'vue-router';
 | 
				
			||||||
import mittBus from '@/common/utils/mitt';
 | 
					import mittBus from '@/common/utils/mitt';
 | 
				
			||||||
export default defineComponent({
 | 
					export default defineComponent({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,13 +1,11 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
    <div class="h100">
 | 
					    <router-view v-slot="{ Component }">
 | 
				
			||||||
        <router-view v-slot="{ Component }">
 | 
					        <transition appear :name="setTransitionName" mode="out-in">
 | 
				
			||||||
            <transition :name="setTransitionName" mode="out-in">
 | 
					            <keep-alive :include="getKeepAliveNames">
 | 
				
			||||||
                <keep-alive :include="getKeepAliveNames">
 | 
					                <component :is="Component" :key="state.refreshRouterViewKey" />
 | 
				
			||||||
                    <component :is="Component" :key="state.refreshRouterViewKey" class="w100" />
 | 
					            </keep-alive>
 | 
				
			||||||
                </keep-alive>
 | 
					        </transition>
 | 
				
			||||||
            </transition>
 | 
					    </router-view>
 | 
				
			||||||
        </router-view>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script lang="ts" setup name="layoutParentView">
 | 
					<script lang="ts" setup name="layoutParentView">
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user