style: lint格式化文件

This commit is contained in:
2025-10-21 18:04:02 +08:00
parent f9ca969fec
commit 7629120548
1092 changed files with 148218 additions and 157907 deletions

View File

@ -1,93 +1,90 @@
<template>
<RouterView>
<template #default="{ Component, route }">
<keep-alive v-if="openCache" :include="getCaches">
<component :is="wrap(route.name, Component)" :key="route.fullPath" />
</keep-alive>
<component v-else :is="Component" :key="route.fullPath" />
</template>
</RouterView>
<FrameLayout v-if="getCanEmbedIFramePage" />
<RouterView>
<template #default="{ Component, route }">
<keep-alive v-if="openCache" :include="getCaches">
<component :is="wrap(route.name, Component)" :key="route.fullPath" />
</keep-alive>
<component v-else :is="Component" :key="route.fullPath" />
</template>
</RouterView>
<FrameLayout v-if="getCanEmbedIFramePage" />
</template>
<script lang="ts">
import { computed, defineComponent, unref, h } from 'vue';
import { computed, defineComponent, unref, h } from 'vue';
import FrameLayout from '/@/layouts/iframe/index.vue';
import FrameLayout from '/@/layouts/iframe/index.vue';
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
import { useRootSetting } from '/@/hooks/setting/useRootSetting';
import { useTransitionSetting } from '/@/hooks/setting/useTransitionSetting';
import { useMultipleTabSetting } from '/@/hooks/setting/useMultipleTabSetting';
import { getTransitionName } from './transition';
import { useTransitionSetting } from '/@/hooks/setting/useTransitionSetting';
import { useMultipleTabSetting } from '/@/hooks/setting/useMultipleTabSetting';
import { getTransitionName } from './transition';
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
import { useFrameKeepAlive } from '../iframe/useFrameKeepAlive';
import { useMultipleTabStore } from '/@/store/modules/multipleTab';
import { useFrameKeepAlive } from '../iframe/useFrameKeepAlive';
export default defineComponent({
name: 'PageLayout',
components: { FrameLayout },
setup() {
const { getShowMultipleTab } = useMultipleTabSetting();
const tabStore = useMultipleTabStore();
export default defineComponent({
name: 'PageLayout',
components: { FrameLayout },
setup() {
const { getShowMultipleTab } = useMultipleTabSetting();
const tabStore = useMultipleTabStore();
const { getOpenKeepAlive, getCanEmbedIFramePage } = useRootSetting();
const { getOpenKeepAlive, getCanEmbedIFramePage } = useRootSetting();
const { getBasicTransition, getEnableTransition } = useTransitionSetting();
const { getBasicTransition, getEnableTransition } = useTransitionSetting();
const openCache = computed(() => unref(getOpenKeepAlive) && unref(getShowMultipleTab));
const openCache = computed(() => unref(getOpenKeepAlive) && unref(getShowMultipleTab));
const getCaches = computed((): string[] => {
if (!unref(getOpenKeepAlive)) {
return [];
const getCaches = computed((): string[] => {
if (!unref(getOpenKeepAlive)) {
return [];
}
return tabStore.getCachedTabList;
});
const { hasRenderFrame } = useFrameKeepAlive();
const wrapperMap = new Map();
const wrap = (name, component) => {
let wrapper;
const wrapperName = name;
if (wrapperMap.has(wrapperName)) {
wrapper = wrapperMap.get(wrapperName);
} else {
wrapper = {
name: wrapperName,
render() {
return h(
'div',
{
className: 'vaf-page-wrapper ' + (hasRenderFrame(name) ? '' : 'h-full') + ' overflow-hidden'
},
component
);
}
};
wrapperMap.set(wrapperName, wrapper);
}
return h(wrapper);
};
return {
getTransitionName,
openCache,
getEnableTransition,
getBasicTransition,
getCaches,
getCanEmbedIFramePage,
wrap
};
}
return tabStore.getCachedTabList;
});
const { hasRenderFrame } = useFrameKeepAlive();
const wrapperMap = new Map();
const wrap = (name, component) => {
let wrapper;
const wrapperName = name;
if (wrapperMap.has(wrapperName)) {
wrapper = wrapperMap.get(wrapperName);
} else {
wrapper = {
name: wrapperName,
render() {
return h(
'div',
{
className:
'vaf-page-wrapper ' +
(hasRenderFrame(name) ? '' : 'h-full') +
' overflow-hidden',
},
component,
);
},
};
wrapperMap.set(wrapperName, wrapper);
}
return h(wrapper);
};
return {
getTransitionName,
openCache,
getEnableTransition,
getBasicTransition,
getCaches,
getCanEmbedIFramePage,
wrap,
};
},
});
});
</script>