mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-09-02 21:59:54 +08:00
fix(form): table全屏后zindex问题
This commit is contained in:
parent
81e3d0a18e
commit
aa601f8703
@ -202,6 +202,7 @@ import {
|
|||||||
TMagicTableColumn,
|
TMagicTableColumn,
|
||||||
TMagicTooltip,
|
TMagicTooltip,
|
||||||
TMagicUpload,
|
TMagicUpload,
|
||||||
|
useZIndex,
|
||||||
} from '@tmagic/design';
|
} from '@tmagic/design';
|
||||||
import { asyncLoadJs, sleep } from '@tmagic/utils';
|
import { asyncLoadJs, sleep } from '@tmagic/utils';
|
||||||
|
|
||||||
@ -246,6 +247,8 @@ const emit = defineEmits(['change', 'select', 'addDiffCount']);
|
|||||||
let timer: any | null = null;
|
let timer: any | null = null;
|
||||||
const mForm = inject<FormState | undefined>('mForm');
|
const mForm = inject<FormState | undefined>('mForm');
|
||||||
|
|
||||||
|
const { nextZIndex } = useZIndex();
|
||||||
|
|
||||||
const tMagicTable = ref<InstanceType<typeof TMagicTable>>();
|
const tMagicTable = ref<InstanceType<typeof TMagicTable>>();
|
||||||
const excelBtn = ref<InstanceType<typeof TMagicUpload>>();
|
const excelBtn = ref<InstanceType<typeof TMagicUpload>>();
|
||||||
const mTable = ref<HTMLDivElement>();
|
const mTable = ref<HTMLDivElement>();
|
||||||
@ -620,11 +623,14 @@ const toggleMode = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const toggleFullscreen = () => {
|
const toggleFullscreen = () => {
|
||||||
|
if (!mTable.value) return;
|
||||||
|
|
||||||
if (isFullscreen.value) {
|
if (isFullscreen.value) {
|
||||||
mTable.value?.classList.remove('fixed');
|
mTable.value.classList.remove('fixed');
|
||||||
isFullscreen.value = false;
|
isFullscreen.value = false;
|
||||||
} else {
|
} else {
|
||||||
mTable.value?.classList.add('fixed');
|
mTable.value.classList.add('fixed');
|
||||||
|
mTable.value.style.zIndex = `${nextZIndex()}`;
|
||||||
isFullscreen.value = true;
|
isFullscreen.value = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user