'处理冲突,请勿拉新(请忽略此版本)'

This commit is contained in:
lyt-Top 2021-07-26 20:12:51 +08:00
parent e3f3a9cc5e
commit a1be0533c4

View File

@ -178,37 +178,14 @@ export default {
addBrowserSetSession(state.tagsViewList); addBrowserSetSession(state.tagsViewList);
}; };
// 6 // 6
const openCurrenFullscreen = (path: string, currentRouteInfo: object) => { const openCurrenFullscreen = (path: string) => {
const { meta, name, params, query } = currentRouteInfo; const item = state.tagsViewList.find((v: any) => v.path === path);
if (meta.isDynamic) router.push({ name, params });
else router.push({ path, query });
nextTick(() => { nextTick(() => {
// `` router.push({ path, query: item.query });
setTimeout(() => { const element = document.querySelector('.layout-main');
const element = document.body; const screenfulls: any = screenfull;
const aside = document.querySelector('aside'); screenfulls.request(element);
const header = document.querySelector('header'); })
const columAside = document.querySelector('.layout-columns-aside');
const layoutView = document.querySelector('.layout-view-bg-white');
screenfull.on('change', () => {
if (screenfull.isFullscreen) {
if (aside) aside.style.display = `none`;
if (header) header.style.display = `none`;
if (columAside) columAside.style.display = `none`;
if (layoutView) layoutView.style.height = `calc(100vh - 30px)`;
} else {
if (aside) aside.style.display = `flex`;
if (header) header.style.display = `block`;
if (columAside) columAside.style.display = `block`;
if (!layoutView) return false;
let { isTagsview } = getThemeConfig.value;
if (isTagsview) layoutView.style.height = `calc(100vh - 114px)`;
else layoutView.style.height = `calc(100vh - 80px)`;
}
});
screenfull.request(element);
}, 800);
});
}; };
// tagsView // tagsView
const getCurrentRouteItem = (path: string) => { const getCurrentRouteItem = (path: string) => {
@ -218,8 +195,7 @@ export default {
// //
const onCurrentContextmenuClick = (item) => { const onCurrentContextmenuClick = (item) => {
const { id, path } = item; const { id, path } = item;
const currentRouteInfo = getCurrentRouteItem(path); const { meta, name, params, query } = getCurrentRouteItem(path);
const { meta, name, params, query } = currentRouteInfo;
switch (id) { switch (id) {
case 0: case 0:
refreshCurrentTagsView(path); refreshCurrentTagsView(path);
@ -238,7 +214,7 @@ export default {
closeAllTagsView(path); closeAllTagsView(path);
break; break;
case 4: case 4:
openCurrenFullscreen(path, currentRouteInfo); openCurrenFullscreen(path);
break; break;
} }
}; };